IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage C++ Discussion :

Problème de compilation


Sujet :

Langage C++

  1. #1
    Membre averti
    Homme Profil pro
    Inscrit en
    Août 2009
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 24
    Par défaut Problème de compilation
    Bonjour,
    je viens d'essayer de compiler OGRE et j'ai ses erreurs qui s'affiche:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
     
    Code : text
     
       1.
          1>LINK : warning LNK4067: point d'entrée ambigu ; 'WinMainCRTStartup' sélectionné
       2.
          1>main.obj : error LNK2028: jeton non résolu (0A000154) "public: static void __cdecl Ogre::NedAllocPolicy::deallocateBytes(void *)" (?deallocateBytes@NedAllocPolicy@Ogre@@$$FSAXPAX@Z) référencé dans la fonction "public: virtual __thiscall Ogre::Any::~Any(void)" (??1Any@Ogre@@$$FUAE@XZ)
       3.
          1>main.obj : error LNK2028: jeton non résolu (0A000281) "public: virtual __thiscall Ogre::FrameListener::~FrameListener(void)" (??1FrameListener@Ogre@@$$FUAE@XZ) référencé dans la fonction "public: __thiscall Application::Application(void)" (??0Application@@$$FQAE@XZ)
       4.
          1>main.obj : error LNK2028: jeton non résolu (0A000425) "public: __thiscall Ogre::FrameListener::FrameListener(void)" (??0FrameListener@Ogre@@$$FQAE@XZ) référencé dans la fonction "public: __thiscall Application::Application(void)" (??0Application@@$$FQAE@XZ)
       5.
          1>main.obj : error LNK2028: jeton non résolu (0A0004EE) "public: static void * __cdecl Ogre::AllocatedObject<class Ogre::CategorisedAllocPolicy<0> >::operator new(unsigned int)" (??2?$AllocatedObject@V?$CategorisedAllocPolicy@<0>A@@Ogre@@@Ogre@@$$FSAPAXI@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
       6.
          1>main.obj : error LNK2028: jeton non résolu (0A0004EF) "public: static void __cdecl Ogre::AllocatedObject<class Ogre::CategorisedAllocPolicy<0> >::operator delete(void *)" (??3?$AllocatedObject@V?$CategorisedAllocPolicy@<0>A@@Ogre@@@Ogre@@$$FSAXPAX@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
       7.
          1>main.obj : error LNK2028: jeton non résolu (0A0008B4) "public: __thiscall Ogre::ParamDictionary::ParamDictionary(class Ogre::ParamDictionary const &)" (??0ParamDictionary@Ogre@@$$FQAE@ABV01@@Z) référencé dans la fonction "public: __thiscall std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::ParamDictionary>::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::ParamDictionary>(struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::ParamDictionary> const &)" (??0?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VParamDictionary@Ogre@@@std@@$$FQAE@ABU01@@Z)
       8.
          1>main.obj : error LNK2028: jeton non résolu (0A000A79) "public: __thiscall Ogre::ParameterDef::ParameterDef(class Ogre::ParameterDef const &)" (??0ParameterDef@Ogre@@$$FQAE@ABV01@@Z) référencé dans la fonction "void __cdecl std::_Construct<class Ogre::ParameterDef,class Ogre::ParameterDef>(class Ogre::ParameterDef *,class Ogre::ParameterDef const &)" (??$_Construct@VParameterDef@Ogre@@V12@@std@@$$FYAXPAVParameterDef@Ogre@@ABV12@@Z)
       9.
          1>main.obj : error LNK2028: jeton non résolu (0A000A7A) "public: __thiscall Ogre::ParameterDef::~ParameterDef(void)" (??1ParameterDef@Ogre@@$$FQAE@XZ) référencé dans la fonction "public: void * __thiscall Ogre::ParameterDef::`scalar deleting destructor'(unsigned int)" (??_GParameterDef@Ogre@@$$FQAEPAXI@Z)
      10.
          1>main.obj : error LNK2028: jeton non résolu (0A000FBF) "public: void __thiscall Ogre::ResourceGroupManager::initialiseAllResourceGroups(void)" (?initialiseAllResourceGroups@ResourceGroupManager@Ogre@@$$FQAEXXZ) référencé dans la fonction "public: void __thiscall Application::LoadResource(void)" (?LoadResource@Application@@$$FQAEXXZ)
      11.
          1>main.obj : error LNK2028: jeton non résolu (0A000FC0) "public: void __thiscall Ogre::ResourceGroupManager::addResourceLocation(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?addResourceLocation@ResourceGroupManager@Ogre@@$$FQAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00_N@Z) référencé dans la fonction "public: void __thiscall Application::LoadResource(void)" (?LoadResource@Application@@$$FQAEXXZ)
      12.
          1>main.obj : error LNK2028: jeton non résolu (0A000FC1) "public: static class Ogre::ResourceGroupManager & __cdecl Ogre::ResourceGroupManager::getSingleton(void)" (?getSingleton@ResourceGroupManager@Ogre@@$$FSAAAV12@XZ) référencé dans la fonction "public: void __thiscall Application::LoadResource(void)" (?LoadResource@Application@@$$FQAEXXZ)
      13.
          1>main.obj : error LNK2028: jeton non résolu (0A000FC2) "public: __thiscall Ogre::Root::Root(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Root@Ogre@@$$FQAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      14.
          1>main.obj : error LNK2028: jeton non résolu (0A000FC3) "public: __thiscall Ogre::Root::~Root(void)" (??1Root@Ogre@@$$FQAE@XZ) référencé dans la fonction "public: void * __thiscall Ogre::Root::`scalar deleting destructor'(unsigned int)" (??_GRoot@Ogre@@$$FQAEPAXI@Z)
      15.
          1>main.obj : error LNK2028: jeton non résolu (0A000FC4) "public: class Ogre::RenderWindow * __thiscall Ogre::Root::initialise(bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialise@Root@Ogre@@$$FQAEPAVRenderWindow@2@_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      16.
          1>main.obj : error LNK2028: jeton non résolu (0A000FC5) "public: class Ogre::SceneManager * __thiscall Ogre::Root::createSceneManager(unsigned short,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?createSceneManager@Root@Ogre@@$$FQAEPAVSceneManager@2@GABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      17.
          1>main.obj : error LNK2028: jeton non résolu (0A000FC6) "public: void __thiscall Ogre::Root::addFrameListener(class Ogre::FrameListener *)" (?addFrameListener@Root@Ogre@@$$FQAEXPAVFrameListener@2@@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      18.
          1>main.obj : error LNK2028: jeton non résolu (0A000FC7) "public: void __thiscall Ogre::Root::startRendering(void)" (?startRendering@Root@Ogre@@$$FQAEXXZ) référencé dans la fonction "public: void __thiscall Application::Run(void)" (?Run@Application@@$$FQAEXXZ)
      19.
          1>main.obj : error LNK2020: jeton non résolu (0A000FDE) "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const Ogre::StringUtil::BLANK" (__imp_?BLANK@StringUtil@Ogre@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B)
      20.
          1>main.obj : error LNK2020: jeton non résolu (0A001081) "__declspec(dllimport) public: static class Ogre::Quaternion const Ogre::Quaternion::IDENTITY" (__imp_?IDENTITY@Quaternion@Ogre@@2V12@B)
      21.
          1>main.obj : error LNK2020: jeton non résolu (0A0010BB) "__declspec(dllimport) public: static class Ogre::Vector3 const Ogre::Vector3::ZERO" (__imp_?ZERO@Vector3@Ogre@@2V12@B)
      22.
          1>main.obj : error LNK2028: jeton non résolu (0A0010C9) "public: static class OIS::InputManager * __cdecl OIS::InputManager::createInputSystem(class std::multimap<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > &)" (?createInputSystem@InputManager@OIS@@$$FSAPAV12@AAV?$multimap@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@Z) référencé dans la fonction "public: void __thiscall Application::InitOIS(void)" (?InitOIS@Application@@$$FQAEXXZ)
      23.
          1>main.obj : error LNK2019: symbole externe non résolu "public: static void __cdecl Ogre::NedAllocPolicy::deallocateBytes(void *)" (?deallocateBytes@NedAllocPolicy@Ogre@@$$FSAXPAX@Z) référencé dans la fonction "public: virtual __thiscall Ogre::Any::~Any(void)" (??1Any@Ogre@@$$FUAE@XZ)
      24.
          1>main.obj : error LNK2019: symbole externe non résolu "public: virtual __thiscall Ogre::FrameListener::~FrameListener(void)" (??1FrameListener@Ogre@@$$FUAE@XZ) référencé dans la fonction "public: __thiscall Application::Application(void)" (??0Application@@$$FQAE@XZ)
      25.
          1>main.obj : error LNK2019: symbole externe non résolu "public: __thiscall Ogre::FrameListener::FrameListener(void)" (??0FrameListener@Ogre@@$$FQAE@XZ) référencé dans la fonction "public: __thiscall Application::Application(void)" (??0Application@@$$FQAE@XZ)
      26.
          1>main.obj : error LNK2001: symbole externe non résolu "public: virtual bool __thiscall Ogre::FrameListener::frameRenderingQueued(struct Ogre::FrameEvent const &)" (?frameRenderingQueued@FrameListener@Ogre@@UAE_NABUFrameEvent@2@@Z)
      27.
          1>main.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) public: static class Ogre::Quaternion const Ogre::Quaternion::IDENTITY" (__imp_?IDENTITY@Quaternion@Ogre@@2V12@B)
      28.
          1>main.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) public: static class Ogre::Vector3 const Ogre::Vector3::ZERO" (__imp_?ZERO@Vector3@Ogre@@2V12@B)
      29.
          1>main.obj : error LNK2019: symbole externe non résolu "public: void __thiscall Ogre::ResourceGroupManager::initialiseAllResourceGroups(void)" (?initialiseAllResourceGroups@ResourceGroupManager@Ogre@@$$FQAEXXZ) référencé dans la fonction "public: void __thiscall Application::LoadResource(void)" (?LoadResource@Application@@$$FQAEXXZ)
      30.
          1>main.obj : error LNK2019: symbole externe non résolu "public: void __thiscall Ogre::ResourceGroupManager::addResourceLocation(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?addResourceLocation@ResourceGroupManager@Ogre@@$$FQAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00_N@Z) référencé dans la fonction "public: void __thiscall Application::LoadResource(void)" (?LoadResource@Application@@$$FQAEXXZ)
      31.
          1>main.obj : error LNK2019: symbole externe non résolu "public: static class Ogre::ResourceGroupManager & __cdecl Ogre::ResourceGroupManager::getSingleton(void)" (?getSingleton@ResourceGroupManager@Ogre@@$$FSAAAV12@XZ) référencé dans la fonction "public: void __thiscall Application::LoadResource(void)" (?LoadResource@Application@@$$FQAEXXZ)
      32.
          1>main.obj : error LNK2019: symbole externe non résolu "public: void __thiscall Ogre::Root::startRendering(void)" (?startRendering@Root@Ogre@@$$FQAEXXZ) référencé dans la fonction "public: void __thiscall Application::Run(void)" (?Run@Application@@$$FQAEXXZ)
      33.
          1>main.obj : error LNK2019: symbole externe non résolu "public: static void __cdecl Ogre::AllocatedObject<class Ogre::CategorisedAllocPolicy<0> >::operator delete(void *)" (??3?$AllocatedObject@V?$CategorisedAllocPolicy@<0>A@@Ogre@@@Ogre@@$$FSAXPAX@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      34.
          1>main.obj : error LNK2019: symbole externe non résolu "public: __thiscall Ogre::Root::~Root(void)" (??1Root@Ogre@@$$FQAE@XZ) référencé dans la fonction "public: void * __thiscall Ogre::Root::`scalar deleting destructor'(unsigned int)" (??_GRoot@Ogre@@$$FQAEPAXI@Z)
      35.
          1>main.obj : error LNK2019: symbole externe non résolu "public: __thiscall Ogre::ParamDictionary::ParamDictionary(class Ogre::ParamDictionary const &)" (??0ParamDictionary@Ogre@@$$FQAE@ABV01@@Z) référencé dans la fonction "public: __thiscall std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::ParamDictionary>::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::ParamDictionary>(struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Ogre::ParamDictionary> const &)" (??0?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VParamDictionary@Ogre@@@std@@$$FQAE@ABU01@@Z)
      36.
          1>main.obj : error LNK2019: symbole externe non résolu "public: __thiscall Ogre::ParameterDef::ParameterDef(class Ogre::ParameterDef const &)" (??0ParameterDef@Ogre@@$$FQAE@ABV01@@Z) référencé dans la fonction "void __cdecl std::_Construct<class Ogre::ParameterDef,class Ogre::ParameterDef>(class Ogre::ParameterDef *,class Ogre::ParameterDef const &)" (??$_Construct@VParameterDef@Ogre@@V12@@std@@$$FYAXPAVParameterDef@Ogre@@ABV12@@Z)
      37.
          1>main.obj : error LNK2019: symbole externe non résolu "public: __thiscall Ogre::ParameterDef::~ParameterDef(void)" (??1ParameterDef@Ogre@@$$FQAE@XZ) référencé dans la fonction "public: void * __thiscall Ogre::ParameterDef::`scalar deleting destructor'(unsigned int)" (??_GParameterDef@Ogre@@$$FQAEPAXI@Z)
      38.
          1>main.obj : error LNK2019: symbole externe non résolu "public: static class OIS::InputManager * __cdecl OIS::InputManager::createInputSystem(class std::multimap<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > &)" (?createInputSystem@InputManager@OIS@@$$FSAPAV12@AAV?$multimap@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@Z) référencé dans la fonction "public: void __thiscall Application::InitOIS(void)" (?InitOIS@Application@@$$FQAEXXZ)
      39.
          1>main.obj : error LNK2019: symbole externe non résolu "public: void __thiscall Ogre::Root::addFrameListener(class Ogre::FrameListener *)" (?addFrameListener@Root@Ogre@@$$FQAEXPAVFrameListener@2@@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      40.
          1>main.obj : error LNK2019: symbole externe non résolu "public: class Ogre::SceneManager * __thiscall Ogre::Root::createSceneManager(unsigned short,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?createSceneManager@Root@Ogre@@$$FQAEPAVSceneManager@2@GABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      41.
          1>main.obj : error LNK2019: symbole externe non résolu "public: class Ogre::RenderWindow * __thiscall Ogre::Root::initialise(bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialise@Root@Ogre@@$$FQAEPAVRenderWindow@2@_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      42.
          1>main.obj : error LNK2001: symbole externe non résolu "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const Ogre::StringUtil::BLANK" (__imp_?BLANK@StringUtil@Ogre@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B)
      43.
          1>main.obj : error LNK2019: symbole externe non résolu "public: __thiscall Ogre::Root::Root(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Root@Ogre@@$$FQAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      44.
          1>main.obj : error LNK2019: symbole externe non résolu "public: static void * __cdecl Ogre::AllocatedObject<class Ogre::CategorisedAllocPolicy<0> >::operator new(unsigned int)" (??2?$AllocatedObject@V?$CategorisedAllocPolicy@<0>A@@Ogre@@@Ogre@@$$FSAPAXI@Z) référencé dans la fonction "public: void __thiscall Application::Start(void)" (?Start@Application@@$$FQAEXXZ)
      45.
          1>C:\Documents and Settings\Mathieu Perochon\Mes documents\mon premier programme\test\Debug\test.exe : fatal error LNK1120: 43 externes non résolus
      46.
          1>Le journal de génération a été enregistré à l'emplacement "file://c:\Documents and Settings\Mathieu Perochon\Mes documents\mon premier programme\test\test\Debug\BuildLog.htm"
      47.
          1>test - 44 erreur(s), 1 avertissement(s)
      48.
          ========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

    voici mon code main.cpp
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
     
    #include <Ogre.h>
     
    class Application
    {
    public :
    	Application();
    	~Application();
     
    	void Start();
    	void Run();
    	void Exit();
     
    public :
    	Ogre::Root* pRoot;
    	Ogre::SceneManager* pSceneManager;
    	Ogre::RenderWindow* pRenderWindow;
    	Ogre::Viewport* pViewport;
    	Ogre::Camera* pCamera;
    };
     
    Application::Application()
    {
    	pRoot = 0;
    	pSceneManager = 0;
    	pRenderWindow = 0;
    	pViewport = 0;
    	pCamera = 0;
    };
     
    Application::~Application()
    {
    	Exit();
    }
     
    void Application::Run()
    {
     	pRoot->startRendering();
    }
     
    void Application::Start()
    {
    	pRoot = new Ogre ::Root();
     
    	pRenderWindow = pRoot->initialise(true,"Ma premiere application Ogre");
     
    	pSceneManager = pRoot->createSceneManager(Ogre::ST_GENERIC, "MonGestionnaireDeScene");
     
    	pCamera = pSceneManager->createCamera("MaCamera");
     
    	pViewport = pRenderWindow->addViewport(pCamera);
     
    }
     
    void Application::Exit()
    {
    	if (pRoot!=0) delete pRoot;
    }
    #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
    {
        try {
    	Application MonApplication ;
    	MonApplication.Start ();
    	MonApplication.Run() ;
    	MonApplication.Exit();
     
        } catch( Ogre::Exception &e ) {
    #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 
            MessageBoxA( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK |   MB_ICONERROR  | 
     
    MB_TASKMODAL);
    #else
            fprintf(stderr, "An exception has occurred: %s\n",
                    e.what());
    #endif
        }
     
        return 0;
    }


    merci de vos réponse,
    cordialement,
    choco,

  2. #2
    Membre très actif Avatar de metagoto
    Profil pro
    Hobbyist programmateur
    Inscrit en
    Juin 2009
    Messages
    646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Hobbyist programmateur

    Informations forums :
    Inscription : Juin 2009
    Messages : 646
    Par défaut
    OGRE est déjà compilé, non ?
    Es-tu sûr que tu link ton programme avec la(les) libs de OGRE ?

  3. #3
    Membre averti
    Homme Profil pro
    Inscrit en
    Août 2009
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 24
    Par défaut
    Oui j'ai verifier j'utilise les bonnes librairie.
    enfin je crois, mais je ne trouve pas comment Ajoutez ajoutez dans le linker OgreMain.lib OIS.lib.
    Pourais-tu me l'expliquer SVP,
    cordialement,
    choco,

    PS: j'utilise Visual C++

  4. #4
    Membre très actif Avatar de metagoto
    Profil pro
    Hobbyist programmateur
    Inscrit en
    Juin 2009
    Messages
    646
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Hobbyist programmateur

    Informations forums :
    Inscription : Juin 2009
    Messages : 646
    Par défaut
    C'est dans les options du projet. Du genre "Additional Dependencies"
    La tu rentres le nom des .lib de OGRE
    Il faut aussi que tu spécifies où aller chercher ces librairies. Il faut configurer ça dans un truc du genre "Additional Library Directories".
    Tout ceci est dans les options du linker.

    Liens du wiki de OGRE
    http://www.ogre3d.org/wiki/index.php...pAnApplication
    http://www.ogre3d.org/wiki/index.php/BuildFAQ

  5. #5
    Membre averti
    Homme Profil pro
    Inscrit en
    Août 2009
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 24
    Par défaut
    Le problème c'est que je ne trouve pas Additional Dependencies.
    Pour infos j'utilise la version francaise de VC++ et c'est la version 2008
    merci de vos reponse,
    cordialement,
    choco,

  6. #6
    Membre Expert
    Avatar de Klaim
    Homme Profil pro
    Développeur de jeux vidéo
    Inscrit en
    Août 2004
    Messages
    1 717
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur de jeux vidéo
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Août 2004
    Messages : 1 717
    Par défaut
    Dans le cas d'une lib déjà compilée (et donc sans utiliser le fichier projet qui est avec les sources), tu dois ajouter les .lib dans les propriétées du projet. J'ai une version anglaise de VS2008 mais je pense que tu trouveras facilement l'équivalent:
    - click droit sur le projet (l'exe ou le dll que tu veux compiler), choisis "Properties";
    - va dans Linker/Input
    - ajoute les nom des lib dans le premier champs qui se nomme "Additonnal Dependencies" (dont parlait megagoto);
    - puis dans Linker/General ajoute dans le champs "Additional Library Directories" tu met l'adresse (complete ou relative au projet) du dossier ou se trouvent les .lib d'ogre.

  7. #7
    Membre averti
    Homme Profil pro
    Inscrit en
    Août 2009
    Messages
    24
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 24
    Par défaut
    Merci, j'ai reussi à compiler ogre.
    Mais maintenant, j'ai cette erreur à l'ouverture du programe:

    OGRE EXCEPTION(1:InvalidStateExeception):Cannot initialise -no render system has been selected. in root::initialise at ..\src\OgreRoot.cpp(line510)
    merci de vos reponse,
    cordialement,
    choco

  8. #8
    Membre Expert
    Avatar de Klaim
    Homme Profil pro
    Développeur de jeux vidéo
    Inscrit en
    Août 2004
    Messages
    1 717
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur de jeux vidéo
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Août 2004
    Messages : 1 717
    Par défaut
    Il va falloir que tu apprennes a utiliser Ogre. Le manuel est là : http://www.ogre3d.org/docs/manual/
    Le wiki est plein de tutoriaux : http://www.ogre3d.org/wiki/index.php/Ogre_Tutorials

    Avant d'appeler Ogre::Root::initialise() il faut avoir enregistré au moins un RenderSystem (D3D, OpenGL ou autre). Donc il faut aussi que tu ai compilé les projets/dll correspondants.

    Le code sur mon projet est comme ça (j'utilise D3D sur Windows et OGL sur les autres plateformes) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
     
    //initialize graphic renderer :
    Ogre::Root* renderer = new Ogre::Root( "", "" , paths::GRAPHIC_LOG_FILE.string() );
    		//resource folders and files definition for NetRush :
    		renderer->addResourceLocation( paths::GRAPHIC_RESOURCES_DIR.string() , "FileSystem", "NetRush", false);
     
     
     
    		/*
    			Render system initialization : 
    			For Windows, we use DirectX9 only. 
    			For others, we use OpenGl only.
    			The shader language is CG (for cross-platform compatibility)?
    			We use OctreeSceneManager.
    			We use ParticleFX?
     
    		*/
     
    #if GC_PLATFORM == GC_PLATFORM_WIN32
    	#ifdef NR_DEBUG
    		renderer->loadPlugin("RenderSystem_Direct3D9_d");
    	#else
    		renderer->loadPlugin("RenderSystem_Direct3D9");
    	#endif
    #else
    	#ifdef NR_DEBUG
    		renderer->loadPlugin("RenderSystem_GL_d");
    	#else
    		renderer->loadPlugin("RenderSystem_GL");
    	#endif
    #endif
     
    		Ogre::RenderSystemList *renderSystemList = renderer->getAvailableRenderers();
    		Ogre::RenderSystemList::iterator r_it;
     
    		Ogre::RenderSystem* renderSystem = nullptr;
     
    		for (r_it=renderSystemList->begin(); r_it!=renderSystemList->end(); r_it++)
    		{
     
    			Ogre::RenderSystem* rs = (*r_it);
    #if GC_PLATFORM == GC_PLATFORM_WIN32
    			if(rs->getName() == "Direct3D9 Rendering Subsystem")
    #else
    			if(rs->getName() == "OpenGL Rendering Subsystem")
    #endif
    			{
    				renderSystem = rs;//we've got the good render system
     
    				break;
    			}
    		}
    		if( renderSystem == nullptr )
    		{
    			//!!! RenderSystem not found!!!
    			NR_EXCEPTION("RenderSystem not found!");
    		} 
     
    		renderer->setRenderSystem(renderSystem);
    #ifdef NR_DEBUG
    		renderer->loadPlugin("Plugin_OctreeSceneManager_d");
    		renderer->loadPlugin("Plugin_CGProgramManager_d");
    		//renderer->loadPlugin("Plugin_ParticleFX_d");
    #else
    		renderer->loadPlugin("Plugin_OctreeSceneManager");
    		renderer->loadPlugin("Plugin_CGProgramManager");
    		//renderer->loadPlugin("Plugin_ParticleFX");
    #endif
     
     
    		//initialise the render engine :
    		renderer->initialise(false);

    Ca peut te donner une idée de ce qu'il faut faire, mais dis toi bien que c'est du code spécifique à mon projet perso.

Discussions similaires

  1. problème de compilation sous visual C++
    Par fabmili dans le forum MFC
    Réponses: 4
    Dernier message: 08/02/2004, 19h52
  2. problème de compil devc++ socket
    Par stefdem dans le forum Autres éditeurs
    Réponses: 2
    Dernier message: 11/12/2003, 11h33
  3. Réponses: 1
    Dernier message: 29/10/2003, 12h16
  4. Problème de compilation de la DLL du XMLRad
    Par [DreaMs] dans le forum XMLRAD
    Réponses: 2
    Dernier message: 16/04/2003, 16h46
  5. Réponses: 1
    Dernier message: 27/05/2002, 01h44

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo