VC++ linking problem
J
jstier at cs.uvic.ca
Thu Jul 7 08:45:02 EDT 2005
Thank you very much Miki!
That was an easy solution. It links... I will put a hold on compiling
the latest version until I really have to. I will probably switch to VC
7 before that.
Cheers
Jochen
Miki Tebeka wrote:
> 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
More information about the Python-list
mailing list