P3t*_*rus 8 python boost mingw boost-python windows-7
我想在Windows 7上使用图形工具,但我在安装它时遇到了麻烦.
此处列出的所有要求均已成功安装.安装了Python 2.7 C:\python27.使用mingw成功编译了Boost 1.49.0,安装了C:\boost并且BOOST_ROOT环境变量指向它.Boost在调试和发布模式下编译,静态和动态.
configure从MSyS内部调用会导致以下错误.
configure: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
Run Code Online (Sandbox Code Playgroud)
调用configure LDFLAGS="-LC:/python27/libs"修复了此错误,但导致以下错误
checking for boostlib >= 1.38.0... configure: error: We could not detect the boo
st libraries (version 1.38 or higher). If you have a staged boost library (still
not installed) please specify $BOOST_ROOT in your environment and do not give a
PATH to --with-boost option. If you are sure you have boost installed, then ch
eck your version number looking in <boost/version.hpp>. See http://randspringer.
de/boost for more documentation.
Run Code Online (Sandbox Code Playgroud)
这很奇怪,因为BOOST_ROOT已经明确定义(用printenv命令检查).
我试过的下一个命令是 configure --with-boost="C:/boost" LDFLAGS="-LC:/python27/libs"
checking for boostlib >= 1.38.0... yes
checking whether the Boost::Python library is available... no
configure: error: No usable boost::python found
Run Code Online (Sandbox Code Playgroud)
好吧,它检测到提升,但它找不到boost :: python.由于它的大小我无法发布config.log堆栈溢出,但你可以在这里找到它.
我现在真的很困惑,并希望得到任何帮助.
我没有为Windows编译图形工具(或其他任何东西)的经验,但是config.log的以下部分很突出:
configure:17224: checking whether the Boost::Python library is available
configure:17254: g++ -c -Wall -ftemplate-depth-150 -Wno-deprecated -Wno-unknown-pragmas -O99 -fvisibility=default -fvisibility-inlines-hidden -Wno-unknown-pragmas -Ic:\python27\include conftest.cpp >&5
conftest.cpp:32:36: fatal error: boost/python/module.hpp: No such file or directory
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
请注意您传递的增强路径是如何使用的!尝试传递CXXFLAGS =" - IC:\ boost\include"进行配置.
可能这样的事情会有所帮助:
./configure --prefix=/usr/
Run Code Online (Sandbox Code Playgroud)
windows的路径不同,自己尝试一下。