链接来提高使​​用Visual C ++防爆preSS 10 ::蟒蛇 [英] Linking to boost::python using Visual C++ Express 10

查看:157
本文介绍了链接来提高使​​用Visual C ++防爆preSS 10 ::蟒蛇的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立的Python(3.2.1)和boost ::蟒蛇(1_47_0)在Windows下用Visual C ++防爆preSS 2010年虽然升压::文件系统工作正常,提振:: Python没有(这些都需要链接到的库,以及标头)。我发现了错误:

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'

这似乎不够清楚,但在舞台/ lib文件夹,我可以看到一个libboost_python_vc100-MT-GD-1_47.lib - 即正确的文件名,但$ P $以libpfixed。不知怎的,autolinking正在为文件系统的东西,而不是为Python。如果我复制的boost :: python的lib和删除lib目录preFIX的所有链接的罚款。

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 filesystem 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.

推荐答案

您必须定义 BOOST_PYTHON_STATIC_LIB ,如果你想使用 libboost _ *

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

这篇关于链接来提高使​​用Visual C ++防爆preSS 10 ::蟒蛇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆