Too late--I managed to get it to build a bit ago. But that being said, I had read that little blurb while trying to figure out what was going on. Unfortunately it's the kind of thing that makes sense if you already know what to do, but it didn't make any sense to me when I was stammering through the process. That happens all the time and I'm sure I have plenty of stuff just like that lying around too. <div>
<br></div><div>I'll probably post some blog thing somewhere on personal hosting and get it harvested onto Google soon, but in the meantime, I figure it would be best for the list to briefly go over the building process for those that just use Boost.Build enough to build Boost:</div>
<div><br></div><div>1. Build a debug python.</div><div>2. Develop a Boost.Build user config to select the debug python and build against it, in a way consistent with your other already-built Boost stuff (see example).</div>
<div>3. Run the bjam command against the user config to build Boost.Python for debugging.</div><div>4. Rebuild your target project, enabling BOOST_DEBUG_PYTHON, and potentially BOOST_PYTHON_NO_LIB (that was what killed me).</div>
<div><br></div><div>For me, the user config:</div><div><div>using python : 2.6 : D:\\temp\\stackless_src\\python-2.6.5-stackless\\PCbuild\\python_d.exe</div><div> : D:\\Python26\\Include</div><div> : D:\\temp\\stackless_src\\python-2.6.5-stackless\\PCbuild</div>
<div> : <python-debugging>on ;</div><div><br></div><div>And the bjam command:</div><div>bjam --user-config=user-config.jam --with-python python-debugging=on threading=multi variant=debug-python link=static stage</div>
<div><br></div><div>Granted, there's probably been, like, five of us that have ever wanted to do this.</div><br><div class="gmail_quote">On Tue, Feb 28, 2012 at 3:18 PM, Dave Abrahams <span dir="ltr"><<a href="mailto:dave@boostpro.com">dave@boostpro.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Please read:<br>
<a href="http://www.boost.org/doc/libs/1_49_0/libs/python/doc/building.html#python-debugging-builds" target="_blank">http://www.boost.org/doc/libs/1_49_0/libs/python/doc/building.html#python-debugging-builds</a><br>
<br>
HTH,<br>
Dave<br>
<div class="HOEnZb"><div class="h5"><br>
on Wed Feb 15 2012, Adam Preble <<a href="http://adam.preble-AT-gmail.com" target="_blank">adam.preble-AT-gmail.com</a>> wrote:<br>
<br>
> I previously posted about runtime oddness when switching to a debug<br>
> build of python. I figured I needed to rebuild Boost.Python. The<br>
> build process is fixated on using the normal python.exe and python.lib<br>
> paths, rather than python_d.exe and python_d.lib. I have put those<br>
> files in my Python26 directory, and then tried to get fancy by<br>
> renaming them to their release names instead. It gets mad at me . . .<br>
><br>
><br>
> Creating library<br>
> bin.v2\libs\python\build\msvc-10.0\release\address-model-32\architecture-<br>
> x86\debug-store-database\debug-symbols-on\python-debugging-on\threading-<br>
> multi\boost_python-vc100-mt-y-1_47.lib and object<br>
> bin.v2\libs\python\build\msvc-10.0\release\address-model-32\architecture-<br>
> x86\debug-store-database\debug-symbols-on\python-debugging-on\threading-<br>
> multi\boost_python-vc100-mt-y-1_47.exp<br>
> module.obj : error LNK2019: unresolved external symbol<br>
> __imp__Py_InitModule4 referenced in function "struct _object * __cdecl<br>
> boost::python::detail::init_module(char const *,void (__cdecl*)<br>
> (void))" (?init_module@detail@python@boost@@YAPAU_object@@PBDP6AXXZ@Z)<br>
> bin.v2\libs\python\build\msvc-10.0\release\address-model-32\architecture-<br>
> x86\debug-store-database\debug-symbols-on\python-debugging-on\threading-<br>
> multi\boost_python-vc100-mt-y-1_47.dll : fatal error LNK1120: 1<br>
> unresolved externals<br>
><br>
> I'm thinking that isn't what I'm supposed to do anyways. Is there<br>
> something I need to do in my build string? This is how I would do a<br>
> full build. Note all the baggage I added for building Python:<br>
><br>
> [FWIW I'm building Boost 1.47 with VS2010's toolchain]<br>
><br>
> set INCLUDE=D:\Python26\include;D:\Python26\include\Stackless<br>
> b2 --toolset=msvc-10.0 --build-type=complete stage<br>
> b2 --toolset=msvc-10.0 --build-type=complete architecture=x86<br>
> address-model=32 stage<br>
> b2 --toolset=msvc-10.0 --with-python --build-type=complete<br>
> --debug-configuration architecture=x86 address-model=32 stage<br>
> debug-symbols=on debug-store=database python-debugging=on<br>
><br>
><br>
><br>
</div></div><div class="im HOEnZb">> _______________________________________________<br>
> Cplusplus-sig mailing list<br>
> <a href="mailto:Cplusplus-sig@python.org">Cplusplus-sig@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/cplusplus-sig" target="_blank">http://mail.python.org/mailman/listinfo/cplusplus-sig</a><br>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
Dave Abrahams<br>
BoostPro Computing<br>
<a href="http://www.boostpro.com" target="_blank">http://www.boostpro.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Cplusplus-sig mailing list<br>
<a href="mailto:Cplusplus-sig@python.org">Cplusplus-sig@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/cplusplus-sig" target="_blank">http://mail.python.org/mailman/listinfo/cplusplus-sig</a></div></div></blockquote></div><br></div>