Hi guys, new on here, just signed up and downloaded the code yesterday.
So I’ve searched around for a tutorial on how to compile on MSVS 2005, as it is my favored C++ editor.
I took the following steps to try to compile it, mostly following this https://discourse.panda3d.org/viewtopic.php?t=1921 :
Opened up a new VS project, deleted the autogenerated CPP file, imported pview.cxx.
Did this, albeit with the new VC8 libs in the newest Panda3d:
For include files go to:
Project>Properties>C++>General>Additional Include Directories
and add: “C:\Panda3D-1.2.3\include”
and “C:\Panda3D-1.2.3\thirdparty\win-libs-vc7\nspr\include”
and “C:\Panda3D-1.2.3\thirdparty\win-python\include”
For libs go to:
Project>Properties>Linker>General>Additional Library Directories
add “C:\Panda3D-1.2.3\lib”
and “C:\Panda3D-1.2.3\thirdparty\win-libs-vc7\nspr\lib”
and “C:\Panda3D-1.2.3\thirdparty\win-python\libs”
or if you’re lazy (I am) put it in your global VS environment path.
Go To: Tools>Options>Projects>VC++ Directories
add the above paths to your Include and Library Directories respectivly
Except couldn’t find “C:\Panda3D-1.2.3\thirdparty\win-libs-vc7\nspr\lib” or its vc8 equivalent.
added header files as described in pview.cxx:
#include “pandaFramework.h”
#include “pandaSystem.h”
#include “textNode.h”
#include “configVariableBool.h”
#include “texturePool.h”
#include “multitexReducer.h”
#include “sceneGraphReducer.h”
#include “partGroup.h”
#include “cardMaker.h”
#include “bamCache.h”
Pressed compile…and it stops compiling at 110 errors.
I have installed Panda3d, DXSDK, and linked the correct thirdparty libs from the Panda3d complete source. What am I doing wrong?
If anyone could give me a step by step checklist I could go through, I will be eternally grateful.
Newbie out.
rdb
October 16, 2008, 6:04am
2
Hmm, have you tried compiling in Release mode?
Otherwise, you can take a look at this zip file:
tom.rethaller.free.fr/vrac/Forums/pview.zip
It is known to work with the latest version of Panda. You do need to change the version numbers in the paths though.
And yeah, the dependency on “nspr” has been removed, already a while ago.
Thank you. I got further compiling that than I did with the other ones.
Still didn’t compile, though. VS2005 had this to say about the ordeal:
1> None of the functions with this name in scope match the target type
1>.\pview.cpp(367) : error C2664: ‘PandaFramework::define_key’ : cannot convert parameter 3 from ‘void (__cdecl *)(CPT_Event,void *)’ to ‘EventHandler::EventCallbackFunction (__cdecl *)’
1> None of the functions with this name in scope match the target type
1>.\pview.cpp(368) : error C2664: ‘PandaFramework::define_key’ : cannot convert parameter 3 from ‘void (__cdecl *)(CPT_Event,void *)’ to ‘EventHandler::EventCallbackFunction (__cdecl *)’
1> None of the functions with this name in scope match the target type
1>.\pview.cpp(369) : error C2664: ‘PandaFramework::define_key’ : cannot convert parameter 3 from ‘void (__cdecl *)(CPT_Event,void *)’ to ‘EventHandler::EventCallbackFunction (__cdecl *)’
1> None of the functions with this name in scope match the target type
1>.\pview.cpp(371) : error C2664: ‘PandaFramework::define_key’ : cannot convert parameter 3 from ‘void (__cdecl *)(CPT_Event,void *)’ to ‘EventHandler::EventCallbackFunction (__cdecl *)’
1> None of the functions with this name in scope match the target type
I just included the errors, and not the warnings, which was a really really long list.
Once again, I’m pretty new to programming and I appreciate yours and any future help that I receive.
rdb
October 16, 2008, 8:26am
4
Searching the forums turns up with this post:
discourse.panda3d.org/viewtopic.php?p=14962#14962
So basically you need to replace stuff like this:
void
event_W(CPT_Event, void *) {
With this instead:
void
event_W(const Event *, void *) {
I don’t know why it was not right in the case of your pview; I do know that in the latest CVS the pview.cxx does do it correctly.
Okay, got the CVS code to compile, but it won’t launch the window.
Instead, it gives the following error:
Unhandled exception at 0x7814500a in pview.exe: 0xC0000005: Access violation reading location 0x00133000.
Can’t find any posts about problems like it. Then again its pretty late here and I’m pretty tired. Getting stuff to compile and run is such a chore sometimes, but hey, I learn something new everytime and wouldn’t trade it for the world.
rdb
October 16, 2008, 10:19am
6
Does compiling in Release mode give you something different?
It worked!
I knew it was something simple. I’ll try to create the project from start to finish and write a step by step guide for posterity soon.
Thanks guys