Skip to content Skip to sidebar Skip to footer

Embed Python Code In C++ (windows + Mingw + Python 2.7.2 + Eclipse)

I'm trying to embed python code in C++ (Windows 7 + minGW + Python 2.7.2 + Eclipse Indigo with CDT and PyDev). So, this is the simple code: #include //Python.h #in

Solution 1:

That is a linker error, not a compiler error. You need to link to the python. As you can see, with the "CrossGCC" toolchain you are almost there:

-lC:/Python27/libs/libpython27.a

You need to change this to

-LC:/Python27/libs -lpython

Post a Comment for "Embed Python Code In C++ (windows + Mingw + Python 2.7.2 + Eclipse)"