Boost.Python Integration with Visual Studio 8

I'm having trouble finding a guide that allows me to integrate Boost.Python compilation into VS 8. It seems to depend heavily on this bjam utility to create the source, but there is no mention of how this can be integrated into the VS 8 interface.

I see that the bjam program calls VS 8 for most of the compilation.

+4
source share
2 answers

bjam is used to compile boost itself (although you can use it as a configuration tool for your code). Running the utility should compile the library and does not require any further work, afaik. The inclusion paths and libraries that you indicated in your second post are correct, as far as I can tell (assuming that the path to the directories you specified is correct, for example: C: \ Python27 \ include).

While I was playing with boost.python, I found out that I was unable to compile the C ++ / Python libraries with the 64-bit version of Python installed. First I had to remove the 64-bit version and install the 32-bit version.

Also, compilation was successful only if I included #define BOOST_PYTHON_STATIC_LIB before the #include statements. I still do not understand why.

Hope my answer (my first on this site, so not too rude with me;)) was helpful.

+3
source

I found a problem, thanks for Philip's suggestion. Turns out I just needed to provide the correct directories and headers and libraries for VS 8 and compile them as DLLs (not a console program).

Include directories:

  • \ push-python \ boost_1_46_1
  • \ python27 \ include`

Library directories:

  • \ python27 \ LIBS
  • \ push-python \ boost_1_46_1 \ stage \ lib`

Can anyone confirm this with the correct directories to be used for inclusion and links?

0
source

Source: https://habr.com/ru/post/1346758/


All Articles