C++学习(三六九)ranlib no such file

在执行C++编译过程中,使用Android NDK的ranlib工具时遇到路径问题。当路径包含cygwin格式时,ranlib无法识别,导致错误。通过去除/cygdrive并使用Windows风格路径解决。更彻底的解决方案是在makefile中修改builddir,确保使用Windows路径名称。

执行如下命令时提示:

D:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe    /cygdrive/e/osg-osgearth-source/other_3rdParty/libiconv-1.15/lib/libcharset.a

换成如下正常

D:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe    ./lib/libcharset.a(当前目录为/cygdrive/e/osg-osgearth-source/other_3rdParty/libiconv-1.15)

以下情况均提示上述错误

D:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe    /cygdrive/e/osg-osgearth-source/other_3rdParty/libcharset.a

D:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe    /cygdrive/e/libcharset.a

问题原因:exe程序不能识别cygwin的目录结构

解决办法:多了/cygdrive,改为如下即可:

D:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe    e:

root@ubuntu:/home/Ubo/release_042/svn/webassembly-ffmpeg-main/web-client# ./build_ffmpeg-emcc.sh Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:97: /libavutil/Makefile: No such file or directory Makefile:97: /ffbuild/library.mak: No such file or directory Makefile:99: /fftools/Makefile: No such file or directory Makefile:100: /doc/Makefile: No such file or directory Makefile:101: /doc/examples/Makefile: No such file or directory Makefile:167: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop. configure: ./configure --cc=emcc --cxx=em++ --ar=emar --ranlib=emranlib --prefix=../ffmpeg-emcc/ --enable-cross-compile --target-os=none --arch=x86_32 --cpu=generic --enable-gpl --disable-asm --disable-programs emcc is unable to create an executable file. C compiler test failed. If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. emconfigure: error: './configure --cc=emcc --cxx=em++ --ar=emar --ranlib=emranlib --prefix=../ffmpeg-emcc/ --enable-cross-compile --target-os=none --arch=x86_32 --cpu=generic --enable-gpl --disable-asm --disable-programs' failed (returned 1) Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:97: /libavutil/Makefile: No such file or directory Makefile:97: /ffbuild/library.mak: No such file or directory Makefile:99: /fftools/Makefile: No such file or directory Makefile:100: /doc/Makefile: No such file or directory Makefile:101: /doc/examples/Makefile: No such file or directory Makefile:167: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:97: /libavutil/Makefile: No such file or directory Makefile:97: /ffbuild/library.mak: No such file or directory Makefile:99: /fftools/Makefile: No such file or directory Makefile:100: /doc/Makefile: No such file or directory Makefile:101: /doc/examples/Makefile: No such file or directory Makefile:167: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop.
最新发布
09-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值