Bij het compileren van een plugin in de Ogre 3D engine krijg ik steeds de error:
De code (copyright Ogre www.ogre3d.org):
Ik voel me heel erg dom
Hierover kan ik niks informatiefs terugvinden op google. Bij mijn wete is de compiler goed ingesteld, want alle andere code compileert perfect. Enkel die ene member dus niet.src/OgreRefAppWorld.cpp:132: function `static OgreRefApp::World&
OgreRefApp::World::getSingleton()' definition is marked dllimport
De code (copyright Ogre www.ogre3d.org):
C++:
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
| // OgreRefAppWorld.cpp World& World::getSingleton(void) { return Singleton<World>::getSingleton(); } // OgreRefAppWorld.h /** Override standard Singleton retrieval. @remarks Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll. @par This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors. */ static World& getSingleton(void); |
Ik voel me heel erg dom