[2.1+] link error due to _OgreExport in OgreMemorySTLAllocator.h Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
rujialiu
Goblin
Posts: 296
Joined: Mon May 09, 2016 8:21 am
x 35

[2.1+] link error due to _OgreExport in OgreMemorySTLAllocator.h

Post by rujialiu »

Hi!

The latest Ogre 2.1 commit doesn't link. An example of error message is:

Code: Select all

1>OgrePlanarReflections.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct Ogre::ActiveActorData * __thiscall Ogre::STLAllocator<struct Ogre::ActiveActorData,class Ogre::CategorisedAllocPolicy<0> >::allocate(unsigned int,void const *)" (__imp_?allocate@?$STLAllocator@UActiveActorData@Ogre@@V?$CategorisedAllocPolicy@$0A@@2@@Ogre@@QAEPAUActiveActorData@2@IPBX@Z) referenced in function "protected: bool __thiscall std::vector<struct Ogre::ActiveActorData,class Ogre::STLAllocator<struct Ogre::ActiveActorData,class Ogre::CategorisedAllocPolicy<0> > >::_Buy(unsigned int)" (?_Buy@?$vector@UActiveActorData@Ogre@@V?$STLAllocator@UActiveActorData@Ogre@@V?$CategorisedAllocPolicy@$0A@@2@@2@@std@@IAE_NI@Z)
It affects several components like PlanarReflection and HlmsUnlit.

I removed all _OgreExport in OgreMain/include/OgreMemorySTLAllocator.h and it worked.

Edit: 2.2 also has this problem. After doing the same fix, the latest Ogre 2.2 commit can compile/link and the samples are working fine.
rujialiu
Goblin
Posts: 296
Joined: Mon May 09, 2016 8:21 am
x 35

Re: [2.1+] link error due to _OgreExport in OgreMemorySTLAllocator.h

Post by rujialiu »

The latest commits solved this issue (both 2.1 and 2.2). Thanks!
Post Reply