This assertion error indicates a mismatch between your header files and your DLL’s: a particular data type in your own build environment is not the same size as the same data type in whatever build environment produced libpanda.dll.
Lots of things can change the size of data types. It might be safest to compile your own version of Panda3D within the same build environment.
Thanks for your help. I’m quite positive that compiling my own version of Panda3D would solve the problem, but there are reasons why I don’t want to do this:
(1) Distributing my own code would be possible in source form only, and not as hand binary .pyd or .dll. Everybody would also have to recompile Panda3D to use my code.
(2) I found that avoiding an error which I don’t understand is a bad thing. Sooner or later (usually sooner) the problem gets back at me. So I want to understand what is going wrong.
(3) I am using the unmodified Panda3D-1.4.2 headers and libraries. So headers and libraries should match.
I will try and investigate what the origin of my problem is. So far I have tracked it down to pmap, since the following code gives different results on both computers. But it is late already where I am from, and I will stop now and investigate some more tomorrow.
Hmm, it might be worth comparing the size of the standard STL std::map, which is what pmap is based from. If that differs between your two different environments, then you’ll just have to blame Microsoft for changing the system headers between environments.
Bingo. Size of std::map has changed in VS 2008 Express.
I think the only way to go with VS 2008 would be to compile Panda3D, and then link against the self-compiled libs. I have chosen to go the other way. VS 2008 Express is uninstalled, and VS 2005 Express is back again. The only difference is that I am still using the new Windows SDK (replaces Platform SDK).
First tests have been successful. Thank you for your help.