<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6002.20613" name=GENERATOR></HEAD>
<BODY id=MailContainerBody 
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftMargin=0 
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV><FONT color=#000000>I'm under vc++ 9.0 and I'm having problem when trying 
to build a simple *.pyd... (using distutils)</FONT></DIV>
<DIV><FONT color=#000000>When I build the dll from the IDE it produces a DLL 
(not a *.pyd) and no compiler or linker errors.</FONT></DIV>
<DIV><FONT color=#000000>But when I use distutils it just output a lot of 
errors...</FONT></DIV>
<DIV><FONT color=#000000>I can't find the problem...</FONT></DIV>
<DIV><FONT color=#000000></FONT>&nbsp;</DIV>
<DIV><FONT 
color=#000000>/*-----------------pydll.cpp:------------------*/</FONT></DIV>
<DIV><FONT size=2><FONT size=2>
<P><FONT color=#000000>#include</FONT></FONT></FONT><FONT color=#000000><FONT 
size=2> </FONT><FONT size=2><FONT 
size=2>&lt;boost/python.hpp&gt;</FONT></FONT><FONT size=2> 
</P></FONT></FONT><FONT size=2><FONT size=2>
<P><FONT color=#000000>#include</FONT></FONT></FONT><FONT color=#000000><FONT 
size=2> </FONT><FONT size=2><FONT 
size=2>&lt;string&gt;</P></FONT></FONT></FONT><FONT size=2><FONT size=2>
<P><FONT color=#000000>using</FONT></FONT></FONT><FONT color=#000000><FONT 
size=2> </FONT><FONT size=2><FONT size=2>namespace</FONT></FONT><FONT size=2> 
boost::python; </P></FONT></FONT><FONT size=2><FONT size=2>
<P><FONT color=#000000>__declspec</FONT></FONT></FONT><FONT color=#000000><FONT 
size=2>(</FONT><FONT size=2><FONT size=2>dllexport</FONT></FONT></FONT><FONT 
size=2><FONT color=#000000>) std::string greet()</FONT></P>
<P><FONT color=#000000>{ </FONT></P>
<P></FONT><FONT color=#000000><FONT size=2><FONT 
size=2>return</FONT></FONT><FONT size=2> </FONT><FONT size=2><FONT size=2>"Hello 
Python"</FONT></FONT></FONT><FONT size=2><FONT color=#000000>; </FONT></P>
<P><FONT color=#000000>}; </FONT></P>
<P><FONT color=#000000>BOOST_PYTHON_MODULE(hello) </FONT></P>
<P><FONT color=#000000>{ def(</FONT></FONT><FONT color=#000000><FONT 
size=2><FONT size=2>"greet"</FONT></FONT><FONT size=2>, greet); } 
</P></FONT><FONT size=2></FONT></FONT></DIV>
<DIV><FONT color=#000000 
size=2>--------------------------------------------------------------</FONT></DIV>
<DIV><FONT size=2><FONT color=#000000 size=3>#setup.py<BR>from distutils.core 
import setup, Extension</FONT></FONT></DIV>
<DIV><FONT color=#000000></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT color=#000000 size=3>module1 = 
Extension('hello',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sources = ["pydll.cpp"])</FONT></FONT></DIV>
<DIV><FONT color=#000000></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT color=#000000 size=3>setup (name = 
'pydll',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version = 
'1.0',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description = 'This is a demo 
package',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ext_modules = 
[module1])</FONT></FONT></DIV>
<DIV><FONT><FONT 
size=2>-------------------------------------------------------------</FONT></FONT></DIV>
<DIV><FONT><FONT size=2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT><FONT size=2>(under visual studio 2008, python 2.6, boost 
1.38.0)</FONT></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Calibri>Thank you</FONT></DIV>
<DIV><FONT face=Calibri>Juan</FONT><FONT></DIV></FONT></BODY></HTML>