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
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