Undefined calling conventions in Python.h

"Martin v. Löwis" martin at v.loewis.de
Wed Jul 23 18:24:28 CEST 2008


> 1>application.obj : error LNK2031: unable to generate p/invoke for
> "extern "C" void __clrcall Py_Exit(int)" (?Py_Exit@@$$J0YMXH at Z);
> calling convention missing in metadata

The main problem here is the __clrcall hint: apparently, you are
using Managed C++ resp. C++/CLI, i.e. the Microsoft .NET Framework for
C++.

Don't do that.

Instead, make sure that your project targets native Intel x86 code;
then compile your code either as C or C++ (your choice). To integrate
Python into managed C++ would require a lot of experience, and it may
well not be possible.

Regards,
Martin



More information about the Python-list mailing list