Preprocessor definition duplication

You might #undef MYINT before to include the header as workaround.

#undef MYINT
#include <Lib1.h>
const int myint_lib1 = MYINT; // 1

#undef MYINT
#include <lib2.h>
const int myint_lib2 = MYINT; // 2

Get the MYINT value of the first library before the second one replaces it.

#include <Lib1.h>
int myInt1 = MYINT;
#undef MYINT
#include <lib2.h>
int myInt2 = MYINT;
#undef MYINT

Of course, that doesn't work if MYINT is something dynamic and you need to keep its actual content around.

Edited by handy999: no semicolon at the end of preprocessor statements.