简体   繁体   中英

Error compiling a c++ with Python bindings using mingw and msys

My environment: Windows 7 64 pro, mingw32 (installed with 2012-04-26.exe installer), msys 1.0, Python 2.7.3 installed using the Win64 installer from python.org

I'm trying to compile a c++ program that has python bindings, using mingw and msys. When I run config from the msys shell, I get the errors

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

I've tried to run configure with each of:

./configure LDFLAGS="-L/c/Python27/libs"

./configure LDFLAGS="-L/c/Python27/Lib"

./configure LDFLAGS="-Lc:/Python27/libs"

./configure LDFLAGS="-Lc:/Python27/libs"

and all give me the same final error. I've posted the entire config.log file at http://pastebin.com/fZVjTeub . Any help?

问题最终是我使用的是32位编译器,并试图将其链接到64位Python。

就我而言,我必须将LDFLAGS="-L/c/Python27/libs"传递给./configure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM