C\C++ Python embedding linking problem

D

DevEng

Hi all,

I am new to Python and trying to embed it into a c/c++ application. I
started with examples from the documentation pages and go to the Pure
Embedding example (http://docs.python.org/ext/pure-embedding.html). I
can compile and run this example on wxDevC++ with a mingwin compiler.
However when I tried this with Borland C++ Builder 5 I get linker
errors.

The code is the same exactly (the same main.c file), the only
difference is the library I am using, as Borland requires OMF format
library (I have converted it from). I am using the same binary
distribution of Python on win XP. As far as I can tell the functions
the linker complains about are not in the converted library or the
original.

[Linker Error] Unresolved external '_Py_InitModule4TraceRefs'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\EXP
\TRY2\PETMAIN.OBJ
[Linker Error] Unresolved external '__Py_RefTotal' referenced from C:
\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\EXP\TRY2\PETMAIN.OBJ
[Linker Error] Unresolved external '__Py_NegativeRefcount' referenced
from C:\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\EXP\TRY2\PETMAIN.OBJ
[Linker Error] Unresolved external '__Py_Dealloc' referenced from C:
\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\EXP\TRY2\PETMAIN.OBJ

As far as I can tell it is a problem with my Borland setup but I
cannot find what it is...

Any help is greatly appreciated,

Ross
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top