Question

I have just started a project c++ with Panda3D. ( Visual Studio 2010 )

With a simple HelloWorld, I add paths etc. No compile error except :

an error just appeared :

 error LNK1104: cannot open file 'python27_d.lib' 

And I have no idea how to fix it.

Plz help !

Thanks !

No correct solution

OTHER TIPS

There's a few things you can do.

1) just build in release mode (not a good solution, since you can't debug too well this way)

2) add another build configuration based on "Release" but with debug symbols and without the _DEBUG preprocessor definition (can mess up some libraries)

3) find or build a Python 2.7 version with debug and release libraries build in Visual Studio 2010

4) just change this one section in the pyconfig.h where it actually links to the *.lib file to just use the python27.lib for both configurations.

/* For an MSVC DLL, we can nominate the .lib files used by extensions */
#ifdef MS_COREDLL
#   ifndef Py_BUILD_CORE /* not building the core - must be an ext */
#       if defined(_MSC_VER)
            /* So MSVC users need not specify the .lib file in
            their Makefile (other compilers are generally
            taken care of by distutils.) */
#           ifdef _DEBUG
#       //-----------------------change the next line-------------//
#               pragma comment(lib,"python27_d.lib") 
#           else
#               pragma comment(lib,"python27.lib")
#           endif /* _DEBUG */
#       endif /* _MSC_VER */
#   endif /* Py_BUILD_CORE */
#endif /* MS_COREDLL */

1) 2) and 4) are hacky solutions, so I'd suggest you try to use 3).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top