Using C++ in Panda3D - Help

SO I went through the manual for C++ using.
I decided to take their script on the end of the tutorial, However:
Strangely,
It won’t allow me to use C++.
It will say the code is invalid.
I’m using PyPE.

How can I use C++???
I’m going to college for this stuff, And they do C++.
Not Python, So I might as well only use C++.

I did read upon the manual,
And to be more specific, I used:

#include “pandaFramework.h”
#include “pandaSystem.h”
PandaFramework framework;
int main(int argc, char *argv[]) {
framework.open_framework(argc,argv);
framework.set_window_title(“Hello World!”);
WindowFramwork *window = framework.open_window();
if (window != (WindowFramework *)NULL) {
nout << “Opened the window successfully!\n”;
window->enable_keyboard();
window->setup_trackball();
fraimwork.main_loop();
} else {
nout << “Could not load the window!\n”;
}
framework.close_framework();
return (0);
}

This is what it says to do as far as converting Panda3D from Python to C++.
Please help, I’m in very much need.

Hi

the code you displayed has two typos:
first is:
WindowFramwork *window = framework.open_window();
need an “e” in WindowFramework
second is:
fraimwork.main_loop();
should be
framework.main_loop();

I compile with Visual Studio 2008 Express,
and running produces the basic gray Panda window.

#include "pandaFramework.h"
#include "pandaSystem.h"
 
PandaFramework framework;

int main(int argc, char *argv[]) {

  framework.open_framework(argc,argv);
  framework.set_window_title("Hello World!");

  WindowFramework *window = framework.open_window();

  if (window != (WindowFramework *)NULL) {
    nout << "Opened the window successfully!\n";
    window->enable_keyboard();
    window->setup_trackball();
    framework.main_loop();
  } else {
    nout << "Could not load the window!\n";
  }

  framework.close_framework();

  return (0);
}

Thanks. I have not tried this yet, as I’m not home.
However,
I don’t see why I’d have typos considering this was 100% from the manual.

Also, would this enable me to type using C++?
If not, why? And what can I do to enable using C++.

Thanks so much!
-Luna

Hi

I don’t see the typos in the manual
http://www.panda3d.org/manual/index.php/Starting_Panda3D

it does look a little different than what you have above.

I’m not sure what you mean in the next two lines

Are you using Visual Studios as a editor/compiler ?
If so just create a project as described in manual.
http://www.panda3d.org/manual/index.php/How_to_build_a_CXX_Panda3D_game

Well see, I’m trying to be able to code in C++ other than Python.
And in the manual, this is what it described as what to put in as far as using C++ instead.

I copy pasted but it told me I had errors, which I did not see (not the typos listed above).
I’m using PyPE

“the code is invalid” is vague. You should tell us exactly which error message you’re getting and what exactly you’re doing to produce the error message.

You’re using PyPE? That’s probably the issue, you’re using an IDE designed for the Python language and that’s why it can’t compile the C++ code; you’ll need to download and install a C++ compiler and IDE (such as Visual Studio) and then you should be good to go.