C++学习(三六九)ranlib no such file
Posted hankern
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C++学习(三六九)ranlib no such file相关的知识,希望对你有一定的参考价值。
执行如下命令时提示:
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:/osg-osgearth-source/other_3rdParty/libiconv-1.15/lib/libcharset.a
较为彻底的解决办法:
将makefile做如下修改,不使用默认的builddir,强制使用windows的路径名称。
lib/localcharset.h :
#builddir="`pwd`"; cd libcharset && $(MAKE) all && $(MAKE) install-lib libdir="$$builddir/lib" includedir="$$builddir/lib"
builddir="e:/osg-osgearth-source/other_3rdParty/libiconv-1.15"; cd libcharset && $(MAKE) all && $(MAKE) install-lib libdir="$$builddir/lib" includedir="$$builddir/lib"
以上是关于C++学习(三六九)ranlib no such file的主要内容,如果未能解决你的问题,请参考以下文章