compiling/linking issues.

tertius terti at mighty.co.za
Wed Sep 15 16:19:52 EDT 2004


Hi All,

I embedded some Python/C API functions in my C dll. I use the Borland 
freecommandline tools.

I converted the python23.lib with coff2omf but still get unresolved 
externals.


If I use coff2omf like this ...  (default)
	coff2omf  python23.lib python23omf.lib
I get the following Errors

Error: Unresolved external 'Py_Initialize'
Error: Unresolved external 'PyString_FromString'
Error: Unresolved external 'PyImport_Import'
Error: Unresolved external 'PyModule_GetDict'
Error: Unresolved external 'PyDict_GetItemString'
Error: Unresolved external 'PyCallable_Check'
Error: Unresolved external 'PyString_AsString'
Error: Unresolved external 'Py_Finalize'



When I use coff2omf like this ...  (Don't perform MS cdecl aliasing)
	coff2omf  -lib:ca python23.lib python23omf.lib
I only get one unresolved external   '_PyObject_CallFunction'


The Dll only has one EXPORT function and is compiled with
"bcc32 -c -ps -tWD"  options   (-ps = generate standerd call)


Can someone please advise me on my linking/compiling options please?

Thanks in advance.
Tertius


ps. When I embed the same code in a main.exe using default coff2omf it 
all works just fine.







More information about the Python-list mailing list