Skip to content Skip to sidebar Skip to footer

Linux C++: Linker Is Outputting Strange Errors

Alright, here is the output I get: arm-none-linux-gnueabi-ld --entry=main -dynamic-linker=/system/bin/linker -rpath-link=/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm

Solution 1:

It looks like you are not linking the proper C++ runtime libraries (which can be different then libstdc++). You should try using the C++ compiler to drive the linker rather then invoking the linker directly.

If you need to pass linker specific options via the compiler, you can use -Wl:

arm-none-linux-gnueabi-g++ -Wl,--entry=main -Wl,-dynamic-linker=/system/bin/linker ...

Solution 2:

I just had very similar problem, and I got the answer from colleagues.

   LOCAL_CFLAGS += -frtti

It makes linker to include the "Runtime type info" into the binaries which you may use in your code.

Post a Comment for "Linux C++: Linker Is Outputting Strange Errors"