Undefined calling conventions in Python.h
Fredrik Lundh
fredrik at pythonware.com
Wed Jul 23 06:16:28 EDT 2008
Jaco Naude wrote:
> good point. I agree that the problem is probably due to name mangling.
> I'm not sure how its possible to tell the application that the DLL is
> a C dll? I've looked at the DLL using Dependency Walker and the
> functions in the DLL are clean (Thus no name mangling used).
>
> How do I tell Visual C++ that the DLL is a C dll? I thought it should
> be in Python.h but this line appears at the top of the file:
>
> /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern
> "C" { */
All the individual includes are wrapped in the usual
#ifdef __cplusplus
extern "C" {
#endif
stuff, so the compiler should default to C bindings, without you having
to do anything. Unfortunately, I haven't used VS 2008, but I find it
hard to believe that they've messed this up completely, and a quick
googling indicates that people are using it with Python without trouble.
Maybe there's some override in your project settings caused by some
other parts of your project? (or an #undef __cplusplus somewhere, perhaps?)
</F>
More information about the Python-list
mailing list