Fast guide to use panda 3d on ubuntu and code::blocks

Hi guys, this is a fast guide to use code::blocks and panda3d on ubuntu (I am using 10.04).

Ok, so here we go:

  1. Go to panda3d download section and select the version for your OS. Double click and install the package.
  2. Open synaptic package manager (System -> administation).
  3. On quick search, enter code::blocks, click on the square next to its name (it is the IDE one), and select “mark for installation,” click on apply.
  4. Now enter “python2.6-dev” on the search, again click on the square next to its name, and select “mark for installation,” then click on apply.
  5. Open code::blocks, and create a new file (File > new > file, select cpp icon and click on go).
  6. Enter the example source, it is in the manual, or you can copy it from here:
// Include all the stuff
#include "pandaFramework.h"
#include "pandaSystem.h"

// Init the PandaFramework class
PandaFramework framework;

int main(int argc, char *argv[]) {
  // Open the framework
  framework.open_framework(argc, argv);
  // Set a nice title
  framework.set_window_title("Hello World!");
  // Open it!
  WindowFramework *window = framework.open_window();

  // Check whether the window is loaded correctly
  if (window != (WindowFramework *)NULL) {
    nout << "Opened the window successfully!\n";

    window->enable_keyboard(); // Enable keyboard detection
    window->setup_trackball(); // Enable default camera movement

    // Put here your own code, such as the loading of your models

    // Do the main loop
  } else {
    nout << "Could not load the window!\n";
  // Close the framework
  return 0;
  1. Now you need to set the search directories open the compiler and debugger settings (Settings > Compiler and debugger… ), click on the “Search Directories” tab. There will be 3 tabs in this section (“compiler”, “linker” and “resource compiler”), select the “compiler” one and click on “add”, browse and select “/usr/include/panda3d” and then click add again and select “/usr/include/python2.6”. Now click on the “Linker” tab, then click on “add” and select the “/usr/lib/panda3d” directory.
    8) Now you need to add the libraries to the linker. In the compiler and debugger window select the linker tab, there will be two lists, click on “add” and browse till the ones you need (in this example you will need “”, “”, “” and “” - all those files can be found at “/usr/lib/panda3d”).
  2. Press F9, and have fun.

Hope it helps.


I have adapted this to be used on windows and have this problem could someone give me a pearl of wisdom on how to correct this?

C:\Panda3D-1.7.2\include\dtoolbase.h|169|fatal error: minmax.h: No such file or directory|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|