and another third party library .. both have clashing macros with variables..
Namespacing is not going to solve it.. do i modify the source in one? Or any better way?
#include <UNeededHeadear> #undef UNeededDefine #include <NeededHeadear> ?
This works for one file.. I have a complex project with include dependencies too many to track and fix... Is this the only way?
make header wrapper?
Can you give an example
cpp #pragma once // Undefine conflicting macro if it's already defined #ifdef CONFLICTING_MACRO #undef CONFLICTING_MACRO #endif #include <boost/some_header.h> // Include the original Boost header cpp #pragma once // Undefine conflicting macro if it's already defined #ifdef CONFLICTING_MACRO #undef CONFLICTING_MACRO #endif #include <third_party/some_header.h> // Include the original ThirdPartyLib header Then, in your project files, #include "boost_wrapper.h" #include "third_party_wrapper.h"
Ok.. will try..
You mean these two code blocks are im two seprate files ?
Обсуждают сегодня