【发布时间】:2016-07-17 10:42:39
【问题描述】:
我正在尝试使用 Cygwin 和/或 cmd 在 Windows 下为 Android 编译一些 Boost 库。
我按照此处显示的说明进行操作:http://www.boost.org/doc/libs/1_61_0/more/getting_started/windows.html
在我设置好必要的环境变量之后:
//At first I tried with cmd
set NDK_ROOT=C:\android-ndk-r12b
set TOOLCHAIN_PATH=C:\android-ndk-r12b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64
set PATH=%PATH%;C:\boost_build\bin;%TOOLCHAIN_PATH%\bin
set NO_BZIP2=1
//I also tried with cygwin
TOOLCHAIN_PATH=/cygdrive/c/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/
NDK_ROOT=/cygdrive/c/android-ndk-r12b/
PATH=$PATH:/cygdrive/c/boost_build/bin:/cygdrive/c/android-ndk-r12b/:$TOOLCHAIN_PATH/bin
NO_BZIP2=1
现在我正在使用这些参数启动 b2:
b2 --build-dir=C:\boost_builded toolset=gcc link=static threading=multi --with-system --with-date_time --with-random stage
我收到这些错误:
//The errors are the same both in cmd and in cygwin
...patience...
...found 1014 targets...
...updating 18 targets...
gcc.archive C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_date_time-gcc54-mt-d-1_61.a
The system cannot find the path specified.
The system cannot find the path specified.
"\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_date_time-gcc54-mt-d-1_61.a" "C:\boost_builded\boost\b
in.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\gregorian\greg_month.o" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\gregorian
\greg_weekday.o" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\gregorian\date_generators.o"
"\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_date_time-gcc54-mt-d-1_61.a"
...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_date_time-gcc54-mt-d-1_61.a...
...skipped <pstage\lib>libboost_date_time-gcc54-mt-d-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\debug\link-static\threading-multi>libboost_date_time-gcc54-mt-d-1
_61.a...
gcc.archive C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_system-gcc54-mt-d-1_61.a
The system cannot find the path specified.
The system cannot find the path specified.
"\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_system-gcc54-mt-d-1_61.a" "C:\boost_builded\boost\bin.v2\
libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\error_code.o"
"\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_system-gcc54-mt-d-1_61.a"
...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_system-gcc54-mt-d-1_61.a...
...skipped <pstage\lib>libboost_system-gcc54-mt-d-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\debug\link-static\threading-multi>libboost_system-gcc54-mt-d-1_61.a...
gcc.archive C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_random-gcc54-mt-d-1_61.a
The system cannot find the path specified.
The system cannot find the path specified.
"\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_random-gcc54-mt-d-1_61.a" "C:\boost_builded\boost\bin.v2\
libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\random_device.o"
"\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_random-gcc54-mt-d-1_61.a"
...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi\libboost_random-gcc54-mt-d-1_61.a...
...skipped <pstage\lib>libboost_random-gcc54-mt-d-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\debug\link-static\threading-multi>libboost_random-gcc54-mt-d-1_61.a...
gcc.archive C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\libboost_date_time-gcc54-mt-1_61.a
The system cannot find the path specified.
The system cannot find the path specified.
"\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\libboost_date_time-gcc54-mt-1_61.a" "C:\boost_builded\boost\b
in.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\gregorian\greg_month.o" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\grego
rian\greg_weekday.o" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\gregorian\date_generators.o"
"\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\libboost_date_time-gcc54-mt-1_61.a"
...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi\libboost_date_time-gcc54-mt-1_61.a...
...skipped <pstage\lib>libboost_date_time-gcc54-mt-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\date_time\build\gcc-5.4.0\release\link-static\threading-multi>libboost_date_time-gcc54-mt-1_6
1.a...
gcc.archive C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi\libboost_system-gcc54-mt-1_61.a
The system cannot find the path specified.
The system cannot find the path specified.
"\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi\libboost_system-gcc54-mt-1_61.a" "C:\boost_builded\boost\bin.v2\
libs\system\build\gcc-5.4.0\release\link-static\threading-multi\error_code.o"
"\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi\libboost_system-gcc54-mt-1_61.a"
...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi\libboost_system-gcc54-mt-1_61.a...
...skipped <pstage\lib>libboost_system-gcc54-mt-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\system\build\gcc-5.4.0\release\link-static\threading-multi>libboost_system-gcc54-mt-1_61.a...
gcc.archive C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi\libboost_random-gcc54-mt-1_61.a
The system cannot find the path specified.
The system cannot find the path specified.
"\usr\i686-pc-cygwin\bin\ar.exe" rc "C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi\libboost_random-gcc54-mt-1_61.a" "C:\boost_builded\boost\bin.v2\
libs\random\build\gcc-5.4.0\release\link-static\threading-multi\random_device.o"
"\usr\i686-pc-cygwin\bin\ranlib.exe" "C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi\libboost_random-gcc54-mt-1_61.a"
...failed gcc.archive C:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi\libboost_random-gcc54-mt-1_61.a...
...skipped <pstage\lib>libboost_random-gcc54-mt-1_61.a for lack of <pC:\boost_builded\boost\bin.v2\libs\random\build\gcc-5.4.0\release\link-static\threading-multi>libboost_random-gcc54-mt-1_61.a...
...failed updating 6 targets...
...skipped 6 targets...
...updated 6 targets...
我什至不确定他没有找到什么路径。我认为它正在寻找“\usr\i686-pc-cygwin\bin\ar.exe”,因为其他路径似乎正确且存在;但我认为它正在寻找“\”,就好像它是linux系统的根目录,而不是在cygwin的子目录中。
如何改正?
【问题讨论】:
-
Cygwin 有自己的根目录。您可以在路径上使用
ls,看看那里有什么。
标签: android c++ windows boost cygwin