[C++-sig] problems building a pyd under vc++ with distutils

Juan Manuel Martinez Caamaño boliguayo1942 at hotmail.com
Fri May 29 05:55:06 CEST 2009


I'm under vc++ 9.0 and I'm having problem when trying to build a simple *.pyd... (using distutils)
When I build the dll from the IDE it produces a DLL (not a *.pyd) and no compiler or linker errors.
But when I use distutils it just output a lot of errors...
I can't find the problem...

/*-----------------pydll.cpp:------------------*/
#include <boost/python.hpp> 

#include <string>

using namespace boost::python; 

__declspec(dllexport) std::string greet()

{ 

return "Hello Python"; 

}; 

BOOST_PYTHON_MODULE(hello) 

{ def("greet", greet); } 

--------------------------------------------------------------
#setup.py
from distutils.core import setup, Extension

module1 = Extension('hello',
                    sources = ["pydll.cpp"])

setup (name = 'pydll',
       version = '1.0',
       description = 'This is a demo package',
       ext_modules = [module1])
-------------------------------------------------------------

(under visual studio 2008, python 2.6, boost 1.38.0)

Thank you
Juan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090529/3605991e/attachment.htm>


More information about the Cplusplus-sig mailing list