Ok.
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)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// 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 {
__published:
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
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
framework.main_loop();
//close the window framework
framework.close_framework();
return (0);
}