Missing .lib files?

I tried to compile the last example of the C++ tutorial source (where the panda moves forth and back).

First I got 76 linker errors, and after adding all .lib files from panda/lib and panda/python/libs I got it down to 20 linker errors.

Are there some other .lib files I need to link still?

When I tried to recompile the libs from source, I can’t find the file dtool_config.h anywhere, it seems to be missing from the source.

When you compile the libs from source, you need to use one of the provided build-systems: makepanda, or ppremake. You can’t just compile the files, otherwise, you miss stuff like dtool_config.h.

It does look like you’re missing a lib file, but since I don’t know what you’re compiling or linking, I don’t know what file it is.

Thanks for the reply. I was trying to compile the last example of the C++ tutorial: panda3d.org/manual/index.php/U … _%28CXX%29
The first example compiled fine (the blank window).

Ah, intervals stuff are in the libp3direct library, so you probably forgot to link to p3direct.

Well, like I said, I tried to link all .lib files I found, but the 20 linker errors still remain.

Well, I can tell you that most of the symbols named above appear in libpanda.lib (with the exception of the interval symbols like CInterval::_type_handle, which appear in libp3direct.lib).

Are you absolutely certain you have both of those libs included? If so, maybe there’s some other problem with your compilation flags. For instance, if you have the wrong BUILDING_DLL variable defined, these values will be compiled as if they should be found locally, rather than being imported from a DLL, which will cause undefined references of this nature.

It’s also possible that you’re using the wrong version of the MSVC compiler–you have to use the same version that built the Panda lib files. I think different versions of the compiler mangled the C++ names in different ways, causing link incompatibilities of this nature (but the different compiler versions aren’t cross-compatible for other reasons too).

David

Hi Lumooja!

Nice to see you on this forum (I remember you from LE forum).

Honestly, try Panda with Python - it’s pleasure :slight_smile:
Don’t mess with C++ unless you have something really hard to compute: Panda is definitely Python-oriented. It has native support for this language (not plug-in, not some superficial quick-and-dirty wrapper).

cough please save me from another c++/python discussion. This is a C++ forum, not general discussion or so.

PS. Panda with C++ is an excellent combination. :slight_smile:

I second what David said: “wrong version of the MSVC compiler.”

Panda is currently compiled with visual studio 2005.

I am using Visual Studio 2005 C++.
It would perhaps help if there was a .sln, .vcproj, vcproj.user, .suo and .cpp file included in the tutorials.

There always used to be one on the manual. I don’t know where it went. I think it should be still around on the forums somewhere.

Hey just wanted to let you know I solved the issue with these linker errors. I was having the same problem with a test program I was trying to compile fully as C++. What it turned out to be was you need to add two preprocessor definitions on the compiler for the project. The definitions are WIN32 and WIN32_VC once added your C++ program should link properly.

Thanks Caelin, that did the trick, and my .cpp file compiles and runs now!

I only added:

#define WIN32_VC

as the first row to mytest1.cpp.