gdb的教程建议使用'gcc -g'进行编译,以使用调试符号编译程序.
但是,我想调试用make编译的程序.如何指示make使用调试符号进行编译?
谢谢.
如何使用Android NDK的独立工具链构建libsdl?我不能使用标准的ndk-build,因为我必须与现有的构建系统集成.
我知道我可能必须分别在我的PATH和CC环境变量中放置交叉编译器的路径和名称,但我认为还有许多其他事情需要完成 - 例如SSE和3DNow可能需要禁用(目标架构是ARM)等
这是我到目前为止:
$ HOSTCONF=arm-eabi-linux
$ TOOLCHAIN=$HOME/android/toolchain
$ export ARCH=armv7-a
$ export SYSROOT=$TOOLCHAIN/sysroot
$ export PATH=$PATH:$TOOLCHAIN/bin:$SYSROOT/usr/local/bin
$ export CROSS_COMPILE=arm-linux-androideabi
$ export CC=${CROSS_COMPILE}-gcc
$ export CXX=${CROSS_COMPILE}-g++
$ export CFLAGS="-DANDROID -mandroid -fomit-frame-pointer --sysroot $SYSROOT -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb"
$ export CXXFLAGS=$CFLAGS
$ ./configure --host=$HOSTCONF --build=i686-pc-linux-gnu --with-sysroot=$SYSROOT --prefix=$SYSROOT/usr/local --disable-joystick
$ make
$ make install
Run Code Online (Sandbox Code Playgroud) 我正在尝试用Android NDK独立编译器工具链构建一些东西,但是我收到了这个错误:
Updating bundled third-party dependencies...
bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
cp output/libFColladaSD.a ../lib/libFColladaSD.a
cp output/libFColladaSR.a ../lib/libFColladaSR.a
Building SpiderMonkey...
SpiderMonkey build options: --disable-tests
loading cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking for mawk... mawk
checking for perl5... no
checking for perl... /usr/bin/perl
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we …Run Code Online (Sandbox Code Playgroud) 任何人都可以告诉我为什么这可能会失败:
afeder@ubuntu:~/android/toolchain/sysroot$ ls $PKG_CONFIG_SYSROOT_DIR/usr/local/lib/pkgconfig/mozjs185.pc
/home/afeder/android/toolchain/sysroot/usr/local/lib/pkgconfig/mozjs185.pc
afeder@ubuntu:~/android/toolchain/sysroot$ pkg-config mozjs185 --cflags
Package mozjs185 was not found in the pkg-config search path.
Perhaps you should add the directory containing `mozjs185.pc'
to the PKG_CONFIG_PATH environment variable
No package 'mozjs185' found
Run Code Online (Sandbox Code Playgroud)
根据pkg-config的手册页,/usr/local/lib/pkgconfig应该是默认搜索路径之一.
android-ndk ×2
gcc ×2
makefile ×2
android ×1
autoconf ×1
configure ×1
debugging ×1
gdb ×1
linux ×1
pkg-config ×1
sdl ×1
spidermonkey ×1