DEPRECATED: This guide does not work, so it has to be removed from the manual. Panda3D does not compile under g++ on windows.
This short guide explains how to build a Panda3D game written in C++ game under Windows. If you use Python for programming, you can skip this page.
For the Linux version of this guide, click here.
First of all, download the following files:
- Python
- The thirdparty package, downloadable from the Downloads section
- The GNU G++ compiler. A recommended compiler is MinGW.
Now, first of all, we need to create a .o file from our cxx file. We need to link to the NSPR include files, to the Panda3D include files and to the Python include files. Please change the paths in these commands to the appropiate locations.
g++ -c filename.cxx -o filename.o -fPIC -O2 -I"c:\path\to\python.h\" -I"c:\Panda3D-1.3.2\thirdparty\linux-libs-a\nspr\include\" -I"C:\Panda3D-1.3.2\include\"
|
Now, we need to make a .exe file out of this. To do that, use this command:
g++ filename.o -o filename.exe -fPIC -L"C:\Panda3D-1.3.2\lib\" -lp3framework -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -L"C:\Panda3D-1.3.2\thirdparty\linux-libs-a\nspr\lib" -lpandanspr4
|
To run your newly created executable, type:
And behold, your C++ Panda3D file!
|