On Thu, Jul 07, 2005 at 04:52:11AM -0700, J wrote:
Hi everyone,
I started embedding python into a 3D graphics App and I came
across this linking problem.
SO.lib(ScnGlobal.obj) : error LNK2001: unresolved external symbol
__imp__Py_InitModule4TraceRefs
SO.lib(ScnNode.obj) : error LNK2001: unresolved external symbol
__imp___Py_RefTotal
SO.lib(ScnLight.obj) : error LNK2001: unresolved external symbol
__imp___Py_RefTotal
I am linking against python24.lib using VC++ 6.0. Before I got to this
point it couldn't find python24_d.lib. After searching around
for a while I came across a solution that included changing
python24_d.lib to python24.lib in one of the header files. I hope that
didn't have a negative effect. I would really appreciate
some help....
It *does* have a negative effect. Python debug and non-debug libraries
are not binary compatible, even when otherwise compiled with the same
settings. I think that's the reason for the _d suffixes for Python debug
binaries on Windows.
The solution for you is to compile yourself a debug version of Python
for testing your whole app in debug mode.
AFAIR in python-dev Python 2.4 can still be compiled with MSVC6, even
though the official binaries are built with MSVC 7.1.
-- Gerhard
--
Gerhard Häring -
gh@ghaering.de - Python, web & database development
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFCzRoldIO4ozGCH14RAk6PAJ9x7CUuPnFAp82Sg2NRbe 2OVT6SRgCfT18w
D+T5F3cskmSEJlmxRMUBBzY=
=cZoG
-----END PGP SIGNATURE-----