c++ - Eclipse not updating "built-in" include paths for Android NDK Project after switching to GCC 4.8 -
i have android/eclipse project uses ndk , i've enabled c++11 support adding following application.mk file:
ndk_toolchain_version := 4.8 #same result here clang app_cppflags += -std=c++11
this works fine, c++11 features available , compile expected. goes ndk-build
, eclipse builds (which invoke nkd-build), eclipse code parser becomes confused now. when open file uses types added stl in c++11 (like example std::unique_ptr
), red squiggles , error entry in problems tab saying symbol 'unique_ptr' not resolved
. wouldn't bad, if errors present in list eclipse refuses launch (or debug) application. right-clicking on #include <memory>
line , selecting open declaration opens wrong (4.6) file.
when checking project properties under c/c++ general --> paths , symbols --> includes still lists old (4.6) includes when show built-in values ticked: screenshot
are cached somewhere , can re-generate entries? i've tried clean , rebuild project, no effect. i'd rather not add them manually if can avoided, upgrading ndk new versions requires quite few changes until compiles again. these entries generated , how trigger update?
i wish have definitive answer you, i've been battling problem quite while myself, have decent workaround. starters, "built-in" entries under "cdt managed build setting entries", generated based on contents of application.mk
file located in jni
directory. there no other way of changing them, , these populate "includes" section in c++ perspective's project explorer. see must have read documentation.html
in ndk installation see put in file already. issue becomes change or breathe hard, includes , irreversably become unresolved. workaround recall exact path of each include entry, right-click on project, go new->folder
, in dialog click advanced
, , select link alternate location (linked folder)
. navigate path (or extend variable if fancy) of include folder, rename descriptive (you can't have 4 linked folders named "include"), , voilĂ ! have usable workspace again. guess "includes" section functionality bit flimsy still, @ least adt, , doing puts includes on same footing other files in project. i'd thrilled if officially sanctioned mechanism started work reliably, , eagerly await news of such. hth!
Comments
Post a Comment