Autor Wątek: Ogre3D probelm przy pierwszej kompilacji  (Przeczytany 3364 razy)

Offline bartis

  • Użytkownik

# Maj 19, 2014, 15:41:35
Witam,

Mam rpoblem przy pierwszej kompilacji programu z ogre, wyskaują takie błędy :
1>  TutorialApplication.cpp
1>e:\projekty\ogre\ogre\tutorialapplication.cpp(53): error C2247: 'BaseApplication::go' not accessible because 'TutorialApplication' uses 'protected' to inherit from 'BaseApplication'
1>          e:\projekty\ogre\ogre\baseapplication.h(43) : see declaration of 'BaseApplication::go'
1>          e:\projekty\ogre\ogre\tutorialapplication.h(22) : see declaration of 'TutorialApplication'
1>          e:\projekty\ogre\ogre\baseapplication.h(37) : see declaration of 'BaseApplication'

Kod programu jest dokładnie jak użyty w tym przykładzie :
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Basic+Tutorial+1&structure=Tutorials

Używam kompilatora visual studio 2010

Offline Mr. Spam

  • Miłośnik przetworów mięsnych

Offline Satirev

  • Użytkownik

# Maj 19, 2014, 16:34:23
Dziedziczysz w sposób chroniony (protected), a najprawdopodobniej powinieneś użyć public.

Offline bartis

  • Użytkownik

# Maj 19, 2014, 17:37:15
przy public wywala
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Gdy w link daję No (/INCREMENTAL:NO)
pokazuje się :
1>BaseApplication.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Ogre::OverlaySystem::OverlaySystem(void)" (__imp_??0OverlaySystem@Ogre@@QAE@XZ) referenced in function "protected: virtual void __thiscall BaseApplication::chooseSceneManager(void)" (?chooseSceneManager@BaseApplication@@MAEXXZ)
1>BaseApplication.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Ogre::OverlaySystem::renderQueueStarted(unsigned char,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool &)" (?renderQueueStarted@OverlaySystem@Ogre@@UAEXEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AA_N@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Ogre::OverlaySystem::~OverlaySystem(void)" (__imp_??1OverlaySystem@Ogre@@UAE@XZ) referenced in function "public: virtual void * __thiscall Ogre::OverlaySystem::`scalar deleting destructor'(unsigned int)" (??_GOverlaySystem@Ogre@@UAEPAXI@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall Ogre::OverlayElement::getName(void)const " (__imp_?getName@OverlayElement@Ogre@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall OgreBites::Widget::getName(void)" (?getName@Widget@OgreBites@@QAEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::OverlayElement * __thiscall Ogre::OverlayManager::createOverlayElement(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)" (__imp_?createOverlayElement@OverlayManager@Ogre@@QAEPAVOverlayElement@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0_N@Z) referenced in function "public: __thiscall OgreBites::SdkTrayManager::SdkTrayManager(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Ogre::RenderWindow *,struct OgreBites::InputContext,class OgreBites::SdkTrayListener *)" (??0SdkTrayManager@OgreBites@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVRenderWindow@Ogre@@UInputContext@1@PAVSdkTrayListener@1@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::Overlay::add2D(class Ogre::OverlayContainer *)" (__imp_?add2D@Overlay@Ogre@@QAEXPAVOverlayContainer@2@@Z) referenced in function "public: __thiscall OgreBites::SdkTrayManager::SdkTrayManager(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Ogre::RenderWindow *,struct OgreBites::InputContext,class OgreBites::SdkTrayListener *)" (??0SdkTrayManager@OgreBites@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVRenderWindow@Ogre@@UInputContext@1@PAVSdkTrayListener@1@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::OverlayElement * __thiscall Ogre::OverlayManager::createOverlayElementFromTemplate(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)" (__imp_?createOverlayElementFromTemplate@OverlayManager@Ogre@@QAEPAVOverlayElement@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00_N@Z) referenced in function "public: __thiscall OgreBites::SdkTrayManager::SdkTrayManager(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Ogre::RenderWindow *,struct OgreBites::InputContext,class OgreBites::SdkTrayListener *)" (??0SdkTrayManager@OgreBites@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVRenderWindow@Ogre@@UInputContext@1@PAVSdkTrayListener@1@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::Overlay::setZOrder(unsigned short)" (__imp_?setZOrder@Overlay@Ogre@@QAEXG@Z) referenced in function "public: __thiscall OgreBites::SdkTrayManager::SdkTrayManager(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Ogre::RenderWindow *,struct OgreBites::InputContext,class OgreBites::SdkTrayListener *)" (??0SdkTrayManager@OgreBites@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVRenderWindow@Ogre@@UInputContext@1@PAVSdkTrayListener@1@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::Overlay * __thiscall Ogre::OverlayManager::create(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?create@OverlayManager@Ogre@@QAEPAVOverlay@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: __thiscall OgreBites::SdkTrayManager::SdkTrayManager(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Ogre::RenderWindow *,struct OgreBites::InputContext,class OgreBites::SdkTrayListener *)" (??0SdkTrayManager@OgreBites@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVRenderWindow@Ogre@@UInputContext@1@PAVSdkTrayListener@1@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class Ogre::OverlayManager & __cdecl Ogre::OverlayManager::getSingleton(void)" (__imp_?getSingleton@OverlayManager@Ogre@@SAAAV12@XZ) referenced in function "public: __thiscall OgreBites::SdkTrayManager::SdkTrayManager(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Ogre::RenderWindow *,struct OgreBites::InputContext,class OgreBites::SdkTrayListener *)" (??0SdkTrayManager@OgreBites@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVRenderWindow@Ogre@@UInputContext@1@PAVSdkTrayListener@1@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::Overlay::show(void)" (__imp_?show@Overlay@Ogre@@QAEXXZ) referenced in function "public: void __thiscall OgreBites::SdkTrayManager::showCursor(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?showCursor@SdkTrayManager@OgreBites@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall Ogre::Overlay::isVisible(void)const " (__imp_?isVisible@Overlay@Ogre@@QBE_NXZ) referenced in function "public: void __thiscall OgreBites::SdkTrayManager::showCursor(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?showCursor@SdkTrayManager@OgreBites@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::Overlay::hide(void)" (__imp_?hide@Overlay@Ogre@@QAEXXZ) referenced in function "public: void __thiscall OgreBites::SdkTrayManager::hideCursor(void)" (?hideCursor@SdkTrayManager@OgreBites@@QAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::OverlayElement::setPosition(float,float)" (__imp_?setPosition@OverlayElement@Ogre@@QAEXMM@Z) referenced in function "public: void __thiscall OgreBites::SdkTrayManager::refreshCursor(void)" (?refreshCursor@SdkTrayManager@OgreBites@@QAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::OverlayElement::setHeight(float)" (__imp_?setHeight@OverlayElement@Ogre@@QAEXM@Z) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::OverlayElement::setWidth(float)" (__imp_?setWidth@OverlayElement@Ogre@@QAEXM@Z) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::OverlayElement::setDimensions(float,float)" (__imp_?setDimensions@OverlayElement@Ogre@@QAEXMM@Z) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall Ogre::OverlayElement::getHeight(void)const " (__imp_?getHeight@OverlayElement@Ogre@@QBEMXZ) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall Ogre::OverlayElement::getLeft(void)const " (__imp_?getLeft@OverlayElement@Ogre@@QBEMXZ) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall Ogre::OverlayElement::getTop(void)const " (__imp_?getTop@OverlayElement@Ogre@@QBEMXZ) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall Ogre::OverlayElement::getWidth(void)const " (__imp_?getWidth@OverlayElement@Ogre@@QBEMXZ) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::OverlayElement::setLeft(float)" (__imp_?setLeft@OverlayElement@Ogre@@QAEXM@Z) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::OverlayElement::setTop(float)" (__imp_?setTop@OverlayElement@Ogre@@QAEXM@Z) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::adjustTrays(void)" (?adjustTrays@SdkTrayManager@OgreBites@@UAEXXZ)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float __thiscall Ogre::TextAreaOverlayElement::getCharHeight(void)const " (__imp_?getCharHeight@TextAreaOverlayElement@Ogre@@QBEMXZ) referenced in function "public: __thiscall OgreBites::ParamsPanel::ParamsPanel(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,float,unsigned int)" (??0ParamsPanel@OgreBites@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MI@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall Ogre::OverlayManager::getViewportHeight(void)const " (__imp_?getViewportHeight@OverlayManager@Ogre@@QBEHXZ) referenced in function "public: static bool __cdecl OgreBites::Widget::isCursorOver(class Ogre::OverlayElement *,class Ogre::Vector2 const &,float)" (?isCursorOver@Widget@OgreBites@@SA_NPAVOverlayElement@Ogre@@ABVVector2@4@M@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall Ogre::OverlayManager::getViewportWidth(void)const " (__imp_?getViewportWidth@OverlayManager@Ogre@@QBEHXZ) referenced in function "public: static bool __cdecl OgreBites::Widget::isCursorOver(class Ogre::OverlayElement *,class Ogre::Vector2 const &,float)" (?isCursorOver@Widget@OgreBites@@SA_NPAVOverlayElement@Ogre@@ABVVector2@4@M@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall Ogre::OverlayElement::isVisible(void)const " (__imp_?isVisible@OverlayElement@Ogre@@QBE_NXZ) referenced in function "public: virtual void __thiscall OgreBites::SdkTrayManager::labelHit(class OgreBites::Label *)" (?labelHit@SdkTrayManager@OgreBites@@UAEXPAVLabel@2@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::OverlayManager::destroyOverlayElement(class Ogre::OverlayElement *,bool)" (__imp_?destroyOverlayElement@OverlayManager@Ogre@@QAEXPAVOverlayElement@2@_N@Z) referenced in function "public: static void __cdecl OgreBites::Widget::nukeOverlayElement(class Ogre::OverlayElement *)" (?nukeOverlayElement@Widget@OgreBites@@SAXPAVOverlayElement@Ogre@@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::OverlayContainer * __thiscall Ogre::OverlayElement::getParent(void)" (__imp_?getParent@OverlayElement@Ogre@@QAEPAVOverlayContainer@2@XZ) referenced in function "public: static void __cdecl OgreBites::Widget::nukeOverlayElement(class Ogre::OverlayElement *)" (?nukeOverlayElement@Widget@OgreBites@@SAXPAVOverlayElement@Ogre@@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::Overlay::remove2D(class Ogre::OverlayContainer *)" (__imp_?remove2D@Overlay@Ogre@@QAEXPAVOverlayContainer@2@@Z) referenced in function "protected: void __thiscall OgreBites::SdkTrayManager::setExpandedMenu(class OgreBites::SelectMenu *)" (?setExpandedMenu@SdkTrayManager@OgreBites@@IAEXPAVSelectMenu@2@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::OverlayContainer * __thiscall Ogre::Overlay::getChild(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?getChild@Overlay@Ogre@@QAEPAVOverlayContainer@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "protected: void __thiscall OgreBites::SdkTrayManager::setExpandedMenu(class OgreBites::SelectMenu *)" (?setExpandedMenu@SdkTrayManager@OgreBites@@IAEXPAVSelectMenu@2@@Z)
1>BaseApplication.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::OverlayManager::destroy(class Ogre::Overlay *)" (__imp_?destroy@OverlayManager@Ogre@@QAEXPAVOverlay@2@@Z) referenced in function "public: virtual __thiscall OgreBites::SdkTrayManager::~SdkTrayManager(void)" (??1SdkTrayManager@OgreBites@@UAE@XZ)
1>E:\Projekty\ogre\Debug\ogre.exe : fatal error LNK1120: 32 unresolved externals

Offline Xirdus

  • Redaktor

# Maj 19, 2014, 17:38:28
Libki zalinkowane?

Offline bartis

  • Użytkownik

# Maj 19, 2014, 18:27:07
Tak

Offline Xirdus

  • Redaktor

# Maj 20, 2014, 01:12:36
Daj screena z konfiguracji linkera.