Mac OS x Snow Leopard and Code Blocks


Downloaded and installed code blocks and Panda3D. Seemed to work fine.

So, I try to compile the simple first example in the manual (see below) and get lots of errors. The first is:

error: pyconfig.h: no such file or directory
error: python.h: no such file or directory

So, I search for this file and find there are three in the Panda3D directory. One is located in /panda3d/include/parser-inc so I added this path to the compile search path which eliminates the error but then I get lots of errors starting with this error:

error: expected primary-expression before ‘enum’
error: ISO C++ forbids declaration of ‘__published’ with no type

when I click on the first error it brings up the file iostream with first part excerpted here:
// Filename: iostream
// Created by: drose (12May00)
// Copyright © Carnegie Mellon University. All rights reserved.
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named “LICENSE.”

// This file, and all the other files in this directory, aren’t
// intended to be compiled–they’re just parsed by CPPParser (and
// interrogate) in lieu of the actual system headers, to generate the
// interrogate database.

#ifndef IOSTREAM_H
#define IOSTREAM_H

// We don’t care (much) about the actual definition of the various
// iostream classes, but we do need to know the classnames that are
// available.

// We need to expose one method in each class to force it to publish.
// But we’d like to expose some of these methods anyway, so no
// problem.
class ios_base {
enum seekdir {
beg = 0,
cur = 1,
end = 2,
enum openmode {

the error is the enum seekdir{ line just above.

Any ideas what I am doing wrong.

All help appreciated. A bit new to Unix/Mac etc.

It is pretty frustrating still :slight_smile:

simple code that I am trying to compile.
#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

//close the window framework
return (0);

You shouldn’t put parser-inc on the include path! Put the pyconfig.h and python.h from the System’s Python 2.5 framework.

Thanks for the help.

I have files called python2.5, python2.6 and python in usr/bin…which I can only see by working in the command prompt.

When I search the drive for pyconfig.h and python.h it only finds a couple of then inside the panda3d directory.

Where system pyconfig.h and python.h located?

Thanks for any additional help.

I think they should be located in:


I only have python 2.6 there but I did find 2.5 in:


there was another 2.6 at:

It seems to compile better with the 2.5 but I can’t seem to run it. Will switch question over to compile forum unless there is an issue you know about which of these I choose.

Thanks again

Just FYI: 1.7.0 on OSX is compiled against Python 2.5, so it won’t work if you try to include the 2.6 headers.