How do I force a 32-bit build of Boost with GCC?

前提是你 提交于 2019-11-27 01:49:40

问题


How do I force a 32-bit build of Boost with GCC? Currently attempting by putting this line in my user-config.jam, but it does not work:

using gcc : 4.1.2 : g++ : compileflags="-m32" ;

回答1:


If you are using C++ Boost 1.40, use:

bjam address-model=32

If you are using eariler version, consider upgrading. If you cannot, use

bjam address-model=32 architecture=x86

I also recommend that you take a look at the fine manual




回答2:


This answer helped me toward a solution that worked for me. I was trying to compile a 32-bits version of boost_1_43_0 on 64-bits debian and eventually came up with this:

./bjam                 \
  cflags=-m32          \
  cxxflags=-m32        \
  address-model=32     \
  threading=multi      \
  architecture=x86     \
  instruction-set=i686 \ 
  stage


来源:https://stackoverflow.com/questions/1357742/how-do-i-force-a-32-bit-build-of-boost-with-gcc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!