Building a Boost Python Debug

I am definitely not a bjam expert, so have mercy on my ignorance if this is something really stupid.

I am trying to create a debug version of boost::python using this tutorial .

I created Python 3.3.0 in my folder C:\Development\Python-3.3.0 . The line really, .lib , .dll and .exe all present in the PCBuild folder. I tested the interpreter and it works correctly.

I use the following command line:

 bjam --user-config=user-config.jam --with-python python-debugging=on threading=multi variant=debug link=shared stage 

My problem comes from user-config.jam . I tried to follow the tutorial specifications using the following:

 using python : 3.3 : C:\\Development\\Python-3.3.0\\PCBuild\\python_d.exe : C:\\Development\\Python-3.3.0\\Include C:\\Development\\Python-3.3.0\\PC : C:\\Development\\Python-3.3.0\\PCBuild : <python-debugging>on ; 

But the connection failed ... for some reason, it doesn't seem to take away that I want it to use 3.3, here is part of the output log:

 ...updating 10 targets... msvc.link.dll bin.v2\libs\python\build\msvc-11.0\debug\python-debugging-on\threa ding-multi\boost_python-vc110-mt-gyd-1_52.dll LINK : fatal error LNK1104: cannot open file 'python26_d.lib' call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.b at" x86 >nul link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /MACHINE:X86 /subsystem:console /out:"b in.v2\libs\python\build\msvc-11.0\debug\python-debugging-on\threading-multi\boos t_python-vc110-mt-gyd-1_52.dll" /IMPLIB:"bin.v2\libs\python\build\msvc-11.0\debu g\python-debugging-on\threading-multi\boost_python-vc110-mt-gyd-1_52.lib" /LIBPA TH:"C:\Development\Python-3.3.0\PCBuild" @"bin.v2\libs\python\build\msvc-11.0\ debug\python-debugging-on\threading-multi\boost_python-vc110-mt-gyd-1_52.dll.rsp " 

I tried to make changes to user-config.jam . Firstly, I did not escape \ , and, surprisingly, I discovered that I wanted to create 3.3, but /LIBPATH was wrong (without a backslash):

 ...updating 10 targets... msvc.link.dll bin.v2\libs\python\build\msvc-11.0\debug\python-debugging-on\threa ding-multi\boost_python-vc110-mt-gyd-1_52.dll LINK : fatal error LNK1181: cannot open input file 'python33_d.lib' call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.b at" x86 >nul link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /MACHINE:X86 /subsystem:console /out:"b in.v2\libs\python\build\msvc-11.0\debug\python-debugging-on\threading-multi\boos t_python-vc110-mt-gyd-1_52.dll" /IMPLIB:"bin.v2\libs\python\build\msvc-11.0\debu g\python-debugging-on\threading-multi\boost_python-vc110-mt-gyd-1_52.lib" /LIBPA TH:"C:DevelopmentPython-3.3.0PCBuild" @"bin.v2\libs\python\build\msvc-11.0\deb ug\python-debugging-on\threading-multi\boost_python-vc110-mt-gyd-1_52.dll.rsp" 

As you can see, it is looking for python33_d.lib , which is desirable, but /LIBPATH does not contain \ . I also tried replacing with / , which again returns to trying to link python26_d.lib .

If this may be useful, I have uninstalled any previously installed version of Python.

How do I make my jam file properly require version 3.3 and provide the correct paths?

Edit: Playing a little more, I removed the “space” before ; ... just doing it, forcing him to look for the correct version 3.3 , but she is trying to link the release version to the relative libs folder ... in the worst case, I would not mind copying libraries from PCBuild to libs

 using python : 3.3 : C:\\Development\\Python-3.3.0\\PCBuild\\python_d.exe : C:\\Development\\Python-3.3.0\\Include C:\\Development\\Python-3.3.0\\PC : C:\\Development\\Python-3.3.0\\PCBuild : <python-debugging>on; 

The funny thing is that he is closest to what I'm trying to achieve, but he deduces

 C:\Development\boost_1_52_0\boost_1_52_0\user-config.jam:4: syntax error at EOF 

The jam parser seems pretty weak ... any hints or hints will be helpful

Edit 2: trying to simplify the problem, I changed my user-config.jam only for availability:

 using python : 3.3 ; 

And use the following command line:

 bjam --user-config=user-config.jam --with-python threading=multi variant=release link=shared stage 

As expected, it cannot find .lib

 ...updating 4 targets... msvc.link.dll bin.v2\libs\python\build\msvc-11.0\release\threading-multi\boost_p ython3-vc110-mt-1_52.dll LINK : fatal error LNK1181: cannot open input file 'python33.lib' call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.b at" x86 >nul link /NOLOGO /INCREMENTAL:NO /DLL /MACHINE:X86 /subsystem:console /out:"bin.v2\l ibs\python\build\msvc-11.0\release\threading-multi\boost_python3-vc110-mt-1_52.d ll" /IMPLIB:"bin.v2\libs\python\build\msvc-11.0\release\threading-multi\boost_py thon3-vc110-mt-1_52.lib" /LIBPATH:"C:\Development\Python-3.3.0\libs" @"bin.v2\ libs\python\build\msvc-11.0\release\threading-multi\boost_python3-vc110-mt-1_52. dll.rsp" 

So, I decided to clone my PCBuild folder in libs so that all the libraries I created were accessible ... but after that without changing the .jam or command line ... now looking for Python 2.6?!?

 ...updating 4 targets... msvc.link.dll bin.v2\libs\python\build\msvc-11.0\release\threading-multi\boost_p ython3-vc110-mt-1_52.dll LINK : fatal error LNK1104: cannot open file 'python26.lib' call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.b at" x86 >nul link /NOLOGO /INCREMENTAL:NO /DLL /MACHINE:X86 /subsystem:console /out:"bin.v2\l ibs\python\build\msvc-11.0\release\threading-multi\boost_python3-vc110-mt-1_52.d ll" /IMPLIB:"bin.v2\libs\python\build\msvc-11.0\release\threading-multi\boost_py thon3-vc110-mt-1_52.lib" /LIBPATH:"C:\Development\Python-3.3.0\libs" @"bin.v2\ libs\python\build\msvc-11.0\release\threading-multi\boost_python3-vc110-mt-1_52. dll.rsp" 

The more I dig, the more I am confused ... also, with error LNK1104 , and the other with LNK1181 ...

+4
source share
1 answer

Ok, I decided to remove all possible parameters from bjam and build from the very beginning. Finally, I got bjam to create every possible target using this command line:

  bjam --user-config=user-config.jam --with-python 

Where user-config.jam contains only the following:

 using python : 3.3 : C:\\Development\\Python-3.3.0\\PCBuild\\python.exe : C:\\Development\\Python-3.3.0\\Include C:\\Development\\Python-3.3.0\\PC : C:\\Development\\Python-3.3.0\\PCBuild : ; 

Now it seems to work correctly.

thanks

+3
source

All Articles