VC++ extension

Stuart Dallas stuart.dallas at rcp.co.uk
Wed Aug 9 04:13:01 EDT 2000


jkraska1 at san.rr.com (Courageous) wrote in <3990C4AF.8C72A366 at san.rr.com>:
>Stuart Dallas wrote:
>> 
>> I am developing an extension for Python in Visual C++ 6. I have created
>> a Win32 DLL project and exported the initx function. When I try to
>> import the extension into Python it responds with the following message:
>> 
>> ImportError: dynamic module does not define init function
>> 
>> I have checked the DLL with QuickView and the init function is being
>> exported.
>> 
>> Help!
>
>One: if you are not actually using classes or other C++ features,
>rename your file from .cpp to .c. The designers of Visual C++,
>in Their Infinite Wisdom (tm), decided that this would be the
>way you'd tell their compiler you want ANSI-C compatability.

Thanks. Changing the file extension to .c worked.

-- 
Stuart Dallas
RCP Consultants Ltd
http://www.rcp.co.uk



More information about the Python-list mailing list