<div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi,</span></div><div><span>The problem was with using the dynamic version of the windows libraries (/MD) - after changing the project settings to use the static libraries (/MT) this worked out just fine.</span></div><div><br><span></span></div><div><span>thanks,</span></div><div><span>-firdaus</span></div><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Jim Bosch-2 [via Boost] <<a href="/user/SendEmail.jtp?type=node&node=3722373&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>><br><b><span style="font-weight: bold;">To:</span></b> fjanoos <<a href="/user/SendEmail.jtp?type=node&node=3722373&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>><br><b><span style="font-weight: bold;">Sent:</span></b> Friday, August 5, 2011
5:35 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: How to import a boost::python dll in windows?<br></font><br><div id="yiv1262752126">
        I know next-to-nothing about linking dynamic libraries in Windows, but
<br>if I saw a message like that in Linux, I'd check my dynamic linker path
<br>to ensure the Boost.Python shared library is in it; any Python module
<br>you build is linked against against that library. If the dynamic linker
<br>can't find the boost_python library when it tries to load your module,
<br>it's very likely that it would complain about your module not being
<br>found, because it was unable to resolve some symbols in it.
<br><br>Hopefully a Windows expert on the list will chime in, but I gather the
<br>list is rather short on those.
<br><br>HTH
<br><br>Jim Bosch
<br><br><br>On 08/05/2011 01:43 PM, fjanoos wrote:
<div class="yiv1262752126shrinkable-quote"><div class='shrinkable-quote'><br>> Hi,
<br>> I am having a similar problem as the o.p.
<br>>
<br>> I was trying to build Python wrappers for the hello_ext project given in the
<br>> boost tutorial using CMake instead of bjam using the instructions as per
<br>> <a rel="nofollow" target="_blank" href="http://mail.python.org/pipermail/cplusplus-sig/2007-June/012247.html" link="external">http://mail.python.org/pipermail/cplusplus-sig/2007-June/012247.html</a><br>>
<br>> The setup is Boost 1.47.0, Python 2.7, Windows 7 x64, MSVC 2008 (9.0) x64.
<br>>
<br>> After doing CMake and MSVC - it produces a hello_ext.dll. Even if i rename
<br>> this to hello_ext.pyd, Python throws the following error. Any suggestions /
<br>> ideas ?
<br>>
<br>> Thanks,
<br>> -fj
<br>>
<br>> In [12]: ls
<br>>
<br>> Directory of
<br>> D:\software\boost\boost-source\libs\python\example\tutorial\build\Release
<br>>
<br>> 05-Aug-11 16:36<DIR> .
<br>> 05-Aug-11 16:36<DIR> ..
<br>> 05-Aug-11 16:34 732 hello_ext.exp
<br>> 05-Aug-11 16:34 945,152 hello_ext.idb
<br>> 05-Aug-11 16:34 1,750 hello_ext.lib
<br>> 05-Aug-11 16:34 11,264 hello_ext.pyd
<br>> 4 File(s) 958,898 bytes
<br>> 2 Dir(s) 370,089,795,584 bytes free
<br>>
<br>> In [13]: import hello_ext
<br>> ---------------------------------------------------------------------------
<br>> ImportError Traceback (most recent call last)
<br>> D:\software\boost\boost-source\libs\python\example\tutorial\build\Release\<ipython-input-13-18c4d654
<br>> 8768> in<module>()
<br>> ----> 1 import hello_ext
<br>>
<br>> ImportError: DLL load failed: The specified module could not be found.
<br>>
<br>>
<br>>
<br>> --
<br>> View this message in context: <a rel="nofollow" target="_blank" href="http://boost.2283326.n4.nabble.com/C-sig-How-to-import-a-boost-python-dll-in-windows-tp2699467p3722232.html" link="external">http://boost.2283326.n4.nabble.com/C-sig-How-to-import-a-boost-python-dll-in-windows-tp2699467p3722232.html</a><br>> Sent from the Python - c++-sig mailing list archive at Nabble.com.
<br>> _______________________________________________
<br>> Cplusplus-sig mailing list
<br>> <a rel="nofollow" target="_top" link="external">[hidden email]</a>
<br>> <a rel="nofollow" target="_blank" href="http://mail.python.org/mailman/listinfo/cplusplus-sig" link="external">http://mail.python.org/mailman/listinfo/cplusplus-sig</a></div></div>_______________________________________________
<br>Cplusplus-sig mailing list
<br><a rel="nofollow" target="_top" link="external">[hidden email]</a>
<br><a rel="nofollow" target="_blank" href="http://mail.python.org/mailman/listinfo/cplusplus-sig" link="external">http://mail.python.org/mailman/listinfo/cplusplus-sig</a><br>
        
        <br>
        <br>
        <hr color="#cccccc" noshade="noshade" size="1">
        <div style="color:#444;font:12px tahoma, geneva, helvetica, arial, sans-serif;">
                <div style="font-weight:bold;">If you reply to this email, your message will be added to the discussion below:</div>
                <a rel="nofollow" target="_blank" href="http://boost.2283326.n4.nabble.com/C-sig-How-to-import-a-boost-python-dll-in-windows-tp2699467p3722336.html" link="external">http://boost.2283326.n4.nabble.com/C-sig-How-to-import-a-boost-python-dll-in-windows-tp2699467p3722336.html</a>
        </div>
        <div style="color:#666;font:11px tahoma, geneva, helvetica, arial, sans-serif;margin-top:.4em;">
                
                To unsubscribe from [C++-sig]How to import a boost::python dll in windows?, <a rel="nofollow" target="_blank" href="" link="external">click here</a>.
        </div></div><br><br></div></div></div>
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://boost.2283326.n4.nabble.com/C-sig-How-to-import-a-boost-python-dll-in-windows-tp2699467p3722373.html">Re: How to import a boost::python dll in windows?</a><br/>
Sent from the <a href="http://boost.2283326.n4.nabble.com/Python-c-sig-f2696818.html">Python - c++-sig mailing list archive</a> at Nabble.com.<br/>