Partage
  • Partager sur Facebook
  • Partager sur Twitter

Installation Ogre 3D

sous code::blocks

    19 juin 2006 à 21:13:09

    Bonjour

    J'ai eu envie d'installer Ogre3D pour regarder un peu...
    J'ai donc d'apres moi tout suivis ce tuto et quand j'essai de compiler ce code :

    /*
    -----------------------------------------------------------------------------This source file is part of OGRE
    (Object-oriented Graphics Rendering Engine)
    For the latest info, see http://www.ogre3d.org/

    Copyright (c) 2000-2005 The OGRE Team
    Also see acknowledgements in Readme.html

    You may use this sample code for anything you like, it is not covered by the
    LGPL like the rest of the engine.
    -----------------------------------------------------------------------------
    */


    #include <Ogre.h>
    #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
    #endif

    #ifdef __cplusplus
    extern "C" {
    #endif

    #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
       INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
    #else
       int main(int argc, char *argv[])
    #endif
       {
          // Create application object
          //Tutoriel1App app;

          SET_TERM_HANDLER;

          try {
             //app.go();
          } catch( Ogre::Exception& e ) {
    #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
             MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
    #else
             std::cerr << "An exception has occured: " <<
                e.getFullDescription().c_str() << std::endl;
    #endif
          }

          return 0;
       }

    #ifdef __cplusplus
    }
    #endif


    J'obtient ceci a la complilation :

    --------------------------------------------------------------------------------
    Switching to target: default
    Linking executable: C:\Documents and Settings\Exedor\Bureau\Essai Ogre\OGRE sample.exe
    .objs\main.o:main.cpp:(.text+0x9): undefined reference to `Ogre::Root::termHandler()'
    collect2: ld returned 1 exit status
    Process terminated with status 1 (0 minutes, 0 seconds)


    Voila, si quelqu'un savait ce qui ne vas pas...

    Merci :)
    • Partager sur Facebook
    • Partager sur Twitter
      20 juin 2006 à 22:31:24

      Tu dois avoir un problemme de linkage ...
      • Partager sur Facebook
      • Partager sur Twitter
        21 juin 2006 à 14:55:05

        Du côté du linkage, je ne vois qu'une chose , OgreMain est par defaut dans les option de linkage, mais il n'existe pas de OgreMain.a dans le SDK de Ogre...

        Edit : Ha il y a un Ogre Main.dll, mais je ne sait pas ou mettre cette Dll... ( c'est bête je sait ... )
        • Partager sur Facebook
        • Partager sur Twitter

        Installation Ogre 3D

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown