Xk0nSid
Xk0nSid

Reputation: 991

Boost compilation error with python

I'm new to the boost C++ library and I'm trying to use boost with python. Whenever I compile my simple test program I get an error:

error: pyconfig.h: No such file or dirctory 

(followed by thousand more errors which I'm sure are because of this missing header). I downloaded boost from it's website and then built the library. I still have no idea why that file is missing and how to get it. Please help!

I'm using code::blocks MinGW compiler and I have pointed code blocks to the boost folder as a search directory for headers as well as libraries. Here's my simple program:

#include <boost/python.hpp>

using namespace boost::python;

int main()
{
    Py_Initialize();
    PyRun_SimpleString("from time import time,ctime\n"
                        "print ’Today is’,ctime(time())\n");
    Py_Finalize();
    return 0;
}

Upvotes: 1

Views: 388

Answers (1)

ThiefMaster
ThiefMaster

Reputation: 318508

You apparently do not have the CPython headers in your include path. Just having boost::python is not enough, you need Python itself, too.

Upvotes: 0

Related Questions