Panda3D Manual: How to compile a CXX Panda3D program on LinuxThis short guide explains how to build a Panda3D game written in C++ game under Linux. First of all, download the following files:
Now, first of all, we need to create a .o file from our cxx file. We need to link 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{pythoninclude} -I{panda3dinclude} To generate an executable, you can use the following command: g++ filename.o -o filename -fPIC -L{panda3dlibs} -lp3framework -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -lp3direct
To run your newly created executable, type: ./filename If it runs, congratulations! You have successfully compiled your own Panda3D program! © Carnegie Mellon University 2010 |