My setup is a bit sketchy, I'll admit. This was working correctly with Eclipse Indigo but Luna keeps rebuilding my C++ Android project over and over.
This happens when I select the "Build on resource save (Auto build)" which was rather convenient. Checking this option gets me into an infinite rebuild loop.
I'm building an Android C++ executable without any java layer. I selected Cross GCC in Tool Chain Editor, I removed all tools except for Cross G++. This step makes the include paths tab appear in C/C++ General configuration.
I call c:\android\android-ndk-windows\ndk-build.cmd
as a build command.
I checked Build (Incremental build) with parameters NDK_DEBUG=1 V=1
Like this :
I removed everything from the Refresh Policy as I was suspecting that ndk-build modifies the project files, which is picked up by the builder as a change, which creates the problematic loop.
I also added boost to android ndk which has its own Android.mk. My own Android.mk looks like this :
LOCAL_PATH := $(call my-dir)
include $(call all-subdir-makefiles)
include $(CLEAR_VARS)
LOCAL_CC = C:\android\android-ndk-windows\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\arm-linux-androideabi-gcc.exe
LOCAL_CXX = C:\android\android-ndk-windows\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\arm-linux-androideabi-g++.exe
LOCAL_MODULE := EventInjectorNative
LOCAL_SRC_FILES := ~SRC_LIST~
LOCAL_CPP_EXTENSION := .cpp
LOCAL_CPPFLAGS := -g -std=c++11
LOCAL_CFLAGS := -g
LOCAL_STATIC_LIBRARIES := boost_filesystem boost_system
#LOCAL_C_INCLUDES := C:\android\android-ndk-windows\sources\cxx-stl\gnu-libstdc++\4.8\include
#LOCAL_C_INCLUDES += /cygdrive/c/android/android-ndk-windows/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86_64/include
#LOCAL_C_INCLUDES += C:\android\android-ndk-windows\sources\cxx-stl\gnu-libstdc++\4.8\libs\armeabi-v7a\include
#LOCAL_C_INCLUDES += C:\android\android-ndk-windows\platforms\android-19\arch-arm\usr\include
LOCAL_C_INCLUDES := C:\\android\\android-ndk-windows\\sources\\cxx-stl\\gnu-libstdc++\\4.8\\include
LOCAL_C_INCLUDES += C:\\android\\android-ndk-windows\\sources\\cxx-stl\\gnu-libstdc++\\4.8\\libs\\armeabi-v7a\\include
LOCAL_C_INCLUDES += C:\\android\\android-ndk-windows\\platforms\\android-19\\arch-arm\\usr\\include
LOCAL_C_INCLUDES += C:\\android\\android-ndk-windows\\sources\\boost
include $(BUILD_EXECUTABLE)
$(call import-module, boost)
Is there any way to tell what exactly triggered the automatic build? Eclipse build console only shows that Auto-Build is triggered by shows no cause or explanation.
Without this, the project builds and runs fine. CDT is able to debug with gdb over tcp and all.
It seems that this was caused by "CDT GCC Build Output Parser" and "Binary Debug Data Entries" in Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. (Gotta love the etc in the name...)
No clue what this was about, but unchecking it stopped the infinite loop