Hi,
I want to build a sample .dll with Boost v1.49 and Python (v3.2.3 or 2.7.3)
in the Qt Creator v2.5.0, Qt v4.8.1, Visual Studio 2010 Express and MS
Windows 7.
When I build my project (tried it with both python versions),
I get a compile error:
D:\boost_1_49_0\boost\python\detail\wrap_python.hpp:50:
error: C1083: Cannot open include file: 'pyconfig.h': No such file or
directory
I have tried the HelloBoost example from:
http://www.youtube.com/watch?v=5AmwIwedTCM
and Boost 'works'. Only with Python I have the problem.
I have googled the whole day, but found no solution. Please can
someone help me?
Is it anyway possible to build a boost/python compilation?
Is there a better solution to expose C++
classes functions and objects to Python?
The example file is from the Boost tutorial:
D:\boost_1_49_0\libs\python\example\tutorial
and there is the way I want to go with the .dll.
It works with bjam (and boost_python-vc100-mt-1_49.dll).
The example file:
#include<boost/python/module.hpp>
#include <boost/python/def.hpp>
char const *greet(void)
{
return "Hello, world";
}
BOOST_PYTHON_MODULE(hello_ext)
{
using namespace boost::python;
def("greet", greet);
}
My .pro:
TARGET=HelloExt
TEMPLATE = lib
DEFINES += HELLOEXT_LIBRARY
SOURCES += \
hello.cpp
HEADERS +=\
HelloExt_global.h
LIBS += -L$$PWD/../../../../boost_1_49_0/stage/lib/
-lboost_python-vc100-mt-1_49
INCLUDEPATH += $$PWD/../../../../boost_1_49_0
DEPENDPATH += $$PWD/../../../../boost_1_49_0
LIBS += -L$$PWD/C:/Python27/libs/ -lpython27
INCLUDEPATH += $$PWD/C:/Python27/include
DEPENDPATH += $$PWD/C:/Python27/include
Thank you very much,
Thomas
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest