makePanda: Compiling Source VS 2010 (Release) and Debug?

Hi,
I’m new to Panda3D.I’m using Windows 7 Service Pack 1 (7.1) with Visual Studio 2010.
I downloaded the source code from source forge:
panda3d.cvs.sourceforge.net/viewvc/panda3d/

I’m following the following tutorial:
panda3d.org/manual/index.php … on_Windows

First of all, to make it work I made changes in makepandacore.py

The following changes
1.

def SdkLocateVisualStudio():
    if (sys.platform != "win32"): return
    vcdir = "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\"
    SDK["VISUALSTUDIO"] = vcdir

2.As stated in the tutorial:

if (sys.platform != "win32"): return
    platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1", "InstallationFolder")

Please notice that my fix wasn’t the best one for item number 1, since I’m hard coding my path. but I didn’t find the right key/value in the registry for me to change the original function.

The compilation seem to be successful.

then I copy my built folder to c:\Panda3D-1.7.2.380 (since I’m using the one found in the first link provided, and I’m guessing is 380. I’m not sure how to find the version of the built. )

Then, following the tutorial from :
panda3d.org/manual/index.php … ng_Panda3D

I created a visual studio 2010 win32 empty project.
I added HelloWorld.cxx file and I copy and paste the code in the above tutorial.

When I run it in release mode, I get the following messages in the console window, and no Panda3D screen:
:display(warning): Unable to load: The specified procedure could not be found
Known pipe types:
(all display modules loaded.)
No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

questions:

  1. Why am I getting those messages, what do I have to do to fix it?
  2. How can I compile Panda3D 32 bits for Debug Mode, so I can have a debug mode version as well (using makepande if possible.)
  3. there is an .sln (vs solution) file in the makepanda directory. When I open it and build, I don’t see anything happens… has anyone used this before?

I hope my steps help someone else trying to compile for visual studio 2010 and help my self getting panda3d up and running for visual studio 2010

thanks,
Francisco

I’m not the best expert on makepanda, but I think I can answer some of your questions.

You can also set the environment variable VCINSTALLDIR to the full path to your visual studio installation; that way you won’t have to modify the code. Similarly, you can set WindowsSdkDir to the path of your platform SDK. But it seems that makepanda really ought to do a better job of locating these automatically.

This usually means some dependent DLL was not found on the PATH. Make sure your PATH includes the directory(ies) that contain all of your build Panda DLL’s, as well as all of the thirdparty DLL’s. Can you successfully run pview from the command line?

If you specify --optimize=1 or --optimize=2 to makepanda, it should build a Debug version.

Sorry, I don’t have experience with this sln file.

David

thanks david.

David,

What part do you think of my path is wrong. I checked and the bin, include and lib looks fine . Do I have to create that .prc file?

Thanks

I mean your PATH environment variable, which specifies the directories that are searched for DLL’s. This isn’t necessarily related to the paths within MSVC (though I guess you could also specify the relevant paths within the project settings somehow).

The important question is whether the system can find all of the DLL’s it needs in order to launch your application. The error message means that it can’t find one or more of them (but it won’t tell you which one). My guess is it’s missing one of your third-party DLL’s, like CgGL.dll or something like that.

If you can run pview.exe from the command line, then it will prove that you have all of the needed DLL’s on your PATH environment variable.

David

I checked my environmental path and it is fine. I also run pview and it works fine. I see a small triangle

what do you think it could be?
here is the code

#include "pandaFramework.h"
#include "pandaSystem.h"
 
PandaFramework framework;
 
int main(int argc, char *argv[]) {
    //open a new window framework
  framework.open_framework(argc, argv);
    //set the window title to My Panda3D Window
  framework.set_window_title("My Panda3D Window");
    //open the window
  WindowFramework *window = framework.open_window();
 
  //here is room for your own code
 
    //do the main loop, equal to run() in python
  framework.main_loop();
    //close the window framework
  framework.close_framework();
  return (0);
}

and like I posted before, here it the message:

:display(warning): Unable to load: The specified procedure could not be found
Known pipe types:
(all display modules loaded.)
No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

Also, I tried adding to the post build, pview.exe , just to see if it would find it, and it works fine.
what do you think it could be?
thanks,
Francisco

You could try to monitor your application with Dependency Walker and/or Process Explorer. Find them via Microsoft Technet.

If you can run pview from the command line, try to see if you can run your newly-compiled application from the command line. You’ll find it in the Release directory within your project file.

David

when I run my .exe from the “Release” folder, I get the same message.

thanks
Francisco

But you can run pview? That’s strange. The error appears to be occurring when the game tries to open the window, which means it is loading libpandagl.dll (assuming you haven’t changed the default video loader). But it’s the same libpandagl.dll that’s loaded by pview, so I don’t know why it would succeed there but fail in your application.

The next step is to try Dependency Walker, as enn0x suggested.

David

what a mission!

Francisco,
I fear that you’re trying to kill too many birds with a single stone (ie stepping into Panda c++ programming, building panda with vs2010, …). The risk is that you may experience early disappointment.
btw. I sense there is some mismatch between your downloads, builds, and compiler (ie you’re talking about 1.7.xxx ang getting the latest cvs which is 1.8.0??)

So why don’t you get into it in 3 steps:
(1) simply use a pre-built version and generate your first c++ app (using vs2008). Just to get a first feeling of it.

for that, here is a well know c++ example I’ve uploaded
rapidshare.com/files/856878241/ … lph-CXX.7z

additionally you can add

load_prc_file_data("", "load-display pandagl") ;  
load_prc_file_data("", "aux-display pandadx9")

to try and cope with your conf file missing

(2) then you should get Panda_1.8.0 from the cvs repository. Build it once with the standard 3rd party libs and your updated SDKs (Windows sdk & latest directx). (use vs2008 here too). Modify makepanda.py & makepandacore.py to cope with your config.

(3) at this point you can enter the vs2010 journey.
ie building the necessary 3rd party libs and compile panda_1.8.0 with vs2010. Then run your app.

Be sure that after a couple of days, you’ll feel better and definitively you’ll fall in love with Panda forever!

cheers
jean-claude

Hi,
thank you for the support.
I’m either going to get it running in VS 2010 or I’m not going do anything about it.

I don’t know which version I have since I just download the tarball from sourceforge… I get I should have done the cvs better… I need to find the link for that

Know, the dependencies that DependencyWalker is saying are missing are:
GPSVC.DLL
IEHIMS.DLL

maybe you are right… maybe I should just download visual studio 2008 and get it over with
I’m just so mad with myself that I can’t get it running in my visual studio 2010

Hey, don’t resign!

Just for your info it took me months to get Panda compiled using Intel C++ parallel studio, with the latest Microsoft SDKs (7.1) and Directx (June 2010).

As a newcomer, start with vs2008 since you’ll need some time too to get used to the intricacies of Panda programming in C++. Be aware that the majority of developpers are using Python, so you’ll have to make an extra effort to grab some understanding of things that are not fully documented.

Having said so, you’ll soon find that Panda has really an horse powered ADN, and that you’ll be able to develop very advanced multimedia apps in a easy way.

And you know what… the good new is that for VS2010, it shouldn’t take too long as soon as you’ll get the 3rd party libs available.

Is there any plans to get an sdk ready for visual studio 2010?

Yeah,
I guess I’m just frustrated. I was even thinking to use Ogre3D that I already have working in visual studio 2010, but I have a feeling that Panda3D is going to be simpler.