2

Im trying to compile a ogre 3d example project on Qt5.0 as a plain c++ project, but Im getting a lot of errors of "No such file or directory", I already add all the paths to the pro file. Also I set the Environment Variable, OGRE_HOME as in this tutorial http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Installing+the+Ogre+SDK .

Can someone help with all steps to make functional Ogre3d SDK on QT5 please Im a beginner.

Im using OgreSDK_vc10_v1-8-1, Mingw 4.7 and QT5.

I followed this steps of a tutorial.

  1. Create a new empty project.
  2. Create a new file for the code and name it main.cpp.
  3. Add the main function:

    int main (void)
    {
      return 0;
    }
    
  4. Include ExampleApplication.h at the top of the following source file:

    #include "Ogre\ExampleApplication.h":
    
  5. Add PathToYourOgreSDK\include\ to the include path of your project.

  6. Add PathToYourOgreSDK\boost_1_42 to the include path of your project.
  7. Add PathToYourOgreSDK\boost_1_42\lib to your library path.
  8. Add a new class to the main.cpp.

    class Example1 : public ExampleApplication
    {
    public:
      void createScene()
      {
      }
    };
    
  9. Add the following code at the top of your main function:

    Example1 app;
    app.go();
    
  10. Add PathToYourOgreSDK\lib\debug to your library path.

  11. Add OgreMain_d.lib to your linked libraries.
  12. Add OIS_d.lib to your linked libraries.
  13. Compile the project.
  14. Set your application working directory to PathToYourOgreSDK\bin\debug.
  15. Start the application. You should see the Ogre 3D Setup dialog.
laalto
  • 150,114
  • 66
  • 286
  • 303
Alex Ar
  • 37
  • 1
  • 7

1 Answers1

2

I am beginner too in Ogre, and I recently found this:

http://advancingusability.wordpress.com/2013/03/30/how-to-integrate-ogre3d-into-a-qt5-qml-scene/

Haven't tried yet, but seems promising to me.

DRAX
  • 30,559
  • 2
  • 26
  • 28
  • Are you using the mingw version? I think I found the problem. The problem is the cmake and the build.bat file configuration. And I saw the link there are only widgets to use qt gui and ogre3d.But thanks for the help.... – Alex Ar May 11 '13 at 18:11
  • Sorry, I didn't had time to test it. But yes, for my projects I am using mingw version. – DRAX May 12 '13 at 23:21
  • Do you have any problems building your projects? I can`t compile any project with ogre 3D,qt and mingw(I can`t compile even ogre3D samples using only mingw) , canyou help me? – Alex Ar May 13 '13 at 14:52