Sysprogs forums › Forums › VisualGDB › Include & Lib paths for NDK
- This topic has 4 replies, 3 voices, and was last updated 11 years, 4 months ago by ket.
-
AuthorPosts
-
August 23, 2013 at 15:39 #629ThirgParticipant
Hi,
Trying out VisualGDB with Android NDK, but I’m having some difficulty creating the sample app.
I had a couple of issues, the first was unable to locate any header files (i.e. sting.h):
AndroidProject3jniAndroidProject3.c(19,20): fatal error : string.h: No such file or directory
So I added the NDK arm include path to the Android.mk file.
LOCAL_C_INCLUDES := E:/android-ndk-r9/platforms/android-18/arch-arm/usr/include
But I’ve now ran into some link problems:
1>E:/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe : error : cannot open crtbegin_so.o: No such file or directory
1>E:/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe : error : cannot open crtend_so.o: No such file or directory
1>E:/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe : error : cannot find -lstdc++
1>E:/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe : error : cannot find -lm
1>E:/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe : error : cannot find -lc
1>E:/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe : error : cannot find -lc
1>E:/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe : error : cannot find -ldlI’ve tried adding the library path to LOCAL_STATIC_LIBRARIES, or even adding each file via the LDFLAGS ( -gc-sections E:/android-ndk-r9/platforms/android-18/arch-arm/usr/lib/crtbegin_so.o ) but no luck with either.
Any ideas what’s wrong? I’d of assumed there should be some way of getting these paths set dependant on the target chipset?
Thanks! 🙂
August 25, 2013 at 03:00 #2601supportKeymasterHi,
Thanks for reporting this. It is a bug in VisualGDB 4.0r3. Please go to VisualGDB Project Properties, Build Settings page and change Targeted Android Platform from android-15 to android-18. We will release a fix resolving this issue in VisualGDB 4.0r4.
August 26, 2013 at 18:24 #2600ketParticipantVisualGDB version 4.0r4 has now been released including a fix for this issue.
August 27, 2013 at 10:13 #2602ThirgParticipantThanks! That fixed the compile / link problem 😀
I have now hit a snag with the “Using Visual Studio to Develop Native Android Code” example though, the breakpoint fails to be hit.
The App runs fine on the simulated device, “Your have pressed this huge button X times” etc.
The command / output window shows this:
E:android-ndk-r9toolchainsarm-linux-androideabi-4.6prebuiltwindows-x86_64binarm-linux-androideabi-gdb.exe –interpreter mi “C:UsersDave JohnsonAppDataLocalVisualGDBAndroidBinaryCacheemulator-AndroidVD1app_process” -x “C:WorkAndroidProject4AndroidProject4libsarmeabi-v7agdb.setup”
No symbol table is loaded. Use the “file” command.
VisualGDB for Android is trying to repair your breakpoints…Any idea how I can get the breakpoints working?
Thanks! 🙂
August 27, 2013 at 18:19 #2603ketParticipantHi,
Please try reloading the symbols (step 6 of this tutorial shows where to open that window). Make sure you are debugging the Debug configuration. Also try using a real device.
If that doesn’t work, then give us your full gdb log. In order to get a full log, please enable diagnostic logging in the GDB settings page of VisualGDB Project Properties. Then start debugging, replicate your scenario, stop debugging, send us the gdb log file from your project directory.
-
AuthorPosts
- You must be logged in to reply to this topic.