i have installed the ogre dev packages from the repos, and i would like to start programming some ogre apps in c++. i was going down the python-ogre route but i decided i may as well do c++ instead, as python-ogre support on linux is lacking, and c++ will be more efficient anyway.
sooo...
Code:
#include "ExampleApplication.h"
class TutorialApplication : public ExampleApplication
{
protected:
public:
TutorialApplication()
{
}
~TutorialApplication()
{
}
protected:
void createScene(void)
{
}
};
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char **argv)
#endif
{
// Create application object
TutorialApplication app;
try {
app.go();
} catch( Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "An exception has occurred: %s\n",
e.getFullDescription().c_str());
#endif
}
return 0;
}
Code:
richard@richard-laptop:~/Desktop$ gcc ogre.cpp
ogre.cpp:1:32: error: ExampleApplication.h: No such file or directory
ogre.cpp:22:21: error: windows.h: No such file or directory
ogre.cpp:4: error: expected class-name before ‘{’ token
ogre.cpp:24: error: ‘INT’ does not name a type
obviously it can't find exampleApplication.h and the windows stuff, well i am not sure about that... i thought ogre was cross platform.
Code:
richard@richard-laptop:~/Desktop$ locate ExampleApplication
/home/richard/src/ogrenew/Samples/Common/include/ExampleApplication.h
richard@richard-laptop:~/Desktop$
that is from when i was trying to compile it from source ages ago... i assume from this that the ubuntu ogre packages don't include the tutorial frameworks...
any hints?
Bookmarks