Problème compilation

Davrok -  
Char Snipeur Messages postés 10112 Date d'inscription   Statut Contributeur Dernière intervention   -
Bonjour,
je viens d'essayer de compiler OGRE et j'ai ses erreurs qui s'affiche:
[QUOTE]
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é ==========
/QUOTE

voici mon code main.cpp
[QUOTE]
#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;
}/QUOTE

merci de vos réponse,
cordialement,
choco,

3 réponses

Char Snipeur Messages postés 10112 Date d'inscription   Statut Contributeur Dernière intervention   1 299
 
salut.
Il doit manquer une bibliothèque lors du link.
0
Davrok
 
oui mais comment l'ajouter??
0
Char Snipeur Messages postés 10112 Date d'inscription   Statut Contributeur Dernière intervention   1 299
 
Sous visual, je ne sais pas exactement.
Quelque part dans les options du projet, dans un champ qui doit s'y rapporté. (édition des liens , link, bibliothèque, library...)
0