开发者

Linking to boost::python using Visual C++ Express 10

I've built Python (3.2.1) and boost::python (1_47_0) under Windows with Visual C++ Express 2010. While boost::filesystem works fine, boost::python doesn't (these both require linking to libraries as well as the header). I'm getting the error:

2>LINK : fatal error LNK1104: cannot open file 'boost_python-vc100-mt-gd-1_47.lib'

This seems clear enough, but in the stage/lib folder I can see a "libboost_python_vc100-mt-gd-1_47.lib" - i.e. the correct filename, but prefixed with "lib". Somehow the autolinking is working for the filesy开发者_Go百科stem stuff, but not for Python. If I copy the boost::python lib and remove the "lib" prefix it all links fine.

Is this a known Boost issue, or is something else wrong? I can rename the files, but it would be nice to remove this step.


You must define BOOST_PYTHON_STATIC_LIB, if you want to use libboost_* libs

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜