When I add #define to either main.cpp or to one of my headers called from main.cpp, it doesn't seem to be defined in other files.
For example, in main.cpp, I can do something like:
#define TEST_FOO 1
Then, in one of my other files, for example secondfile.cpp, TEST_FOO is ignored, as if it had never been defined:
#if TEST_FOO // do something <- this never gets reached
Even if in the Android.mk file I put the secondfile.cpp file after main.cpp:
LOCAL_SRC_FILES := main.cpp \ secondfile.cpp
Is there a way #define values ββin Android NDK inside the actual code?
android c-preprocessor android-ndk
Nitzan wilnai
source share