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 <[EMAIL PROTECTED]>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys

Attachment: pgps6D8NhH5ez.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to