我不能用boost_thread_win32-mt-s).在上构建Boost (我不能创建MinGW )
这是操作系统的一个版本:
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty这是明明威的版本:
# i586-mingw32msvc-g++ --version
i586-mingw32msvc-g++ (GCC) 4.2.1-sjlj (mingw32-2)我下载了Boost版本1.50。我试着建造它:
echo "using gcc : 4.2 : i586-mingw32msvc-g++ ;" > user-config.jam
./bootstrap.sh
./b2 --user-config=user-config.jam \
--with-thread \
--with-system \
-sNO_BZIP2=1 \
-sNO_ZLIB=1 \
--layout=tagged \
--build-type=complete \
link=static,shared \
runtime-link=static,shared \
threading=single,multi \
toolset=gcc \
target-os=windows \
address-model=32 \
release stage之后:
# pwd
/usr/src/boost_1_50_0/stage/lib
# ls -1
libboost_system-mt-s.a
libboost_system-mt.a
libboost_system-mt.dll
libboost_system-mt.dll.a
libboost_system-s.a
libboost_system.a
libboost_system.dll
libboost_system.dll.a为什么我不能构建"boost_thread_win32-mt-s“或其他"boost_thread_XXX"?
发布于 2017-12-06 09:19:06
我解决了这个问题。我忘了提到Win的线程模型(threadapi=win32)。
解决方案:
echo "using gcc : 4.2 : i586-mingw32msvc-g++ ;" > user-config.jam
./bootstrap.sh
./b2 --user-config=user-config.jam \
--with-thread \
--with-system \
-sNO_BZIP2=1 \
-sNO_ZLIB=1 \
--layout=tagged \
--build-type=complete \
link=static,shared \
runtime-link=static,shared \
threading=single,multi \
toolset=gcc \
target-os=windows \
threadapi=win32 \
address-model=32 \
release stage谢谢!
https://stackoverflow.com/questions/47478300
复制相似问题