VC++ linking problem
Miki Tebeka
miki.tebeka at zoran.com
Thu Jul 7 08:15:08 EDT 2005
Hello Jochen,
> 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....
This is since Python header file is in debug mode and you link with the
regular library.
Just do:
#undef _DEBUG /* Link with python24.lib and not python24_d.lib */
#include <Python.h>
and you'll be fine.
IMO python should try and link with python24.lib when compiling in debug
mode since we want to debug our program and not Python.
Bye.
--
------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 193 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050707/48193032/attachment.sig>
More information about the Python-list
mailing list