Include Python in Qt Creator
Question: I am trying to embed python in my c++ code in my qt project as per [this
tutorial](https://docs.python.org/2/extending/embedding.html). I am now
getting this error code: "error: undefined reference to `_imp__Py_Initialize'"

Before this, I had the same problem in CodeBlocks and fixed it by with these
additional arguments "-IC:\Python27\include\ -IC:\Python27\libs\" and
"C:\Python27\libs\python27.lib"

Adding the same commands to my .pro file as such:

    
    
    QMAKE_CXXFLAGS += -Wall -fexceptions -g -IC:\Python27\include\ -IC:\Python27\libs\ C:\Python27\libs\python27.lib
    

Allows me to import python.h but nothing more.

I know that questions like this have been posted before, and they helped me
get running in CodeBlocks, but the same information dosent apply to Qt, or I
am implementing it wrong.


Answer: To build on HeyYO's answer, the .pro arguments to fix the problem are:

    
    
    INCLUDEPATH = c:\Python27\include\ c:\Python27\libs\
    
    LIBS += C:\Python27\libs\python27.lib
    
    QMAKE_CXXFLAGS += C:\Python27\libs\python27.lib
    

