Closed Fighter19 closed 4 years ago
I can reproduce this issue and I found out that it is caused by this lines:
https://github.com/OGRECave/ogitor/blob/b4440579c2b15340085cb03f021b5918512fe3fa/Ogitor/include/OgitorsExports.h#L35-L47
OGITOR_EXPORT
isn't defined anywhere, so every OgitorExport
declaration is replaced with __declspec (dllimport)
even when building Ogitor, which is wrong.
Either one could just define it using COMPILE_DEFINITIONS or change the DEFINE_SYMBOL which does something similar but defines Ogitor_EXPORTS
instead by default.
in ogre I ported most of the modules to https://cmake.org/cmake/help/latest/module/GenerateExportHeader.html
however with ogitor we should aim to get it into a usable state first. Checking for #ifdef Ogitor_EXPORTS
is probably the fastest way to get there.
fixed by #16
When building with MSVC (14.1 / 2017) an error occurs, as the classes imported via dllimport have static members.
error C2491: "Ogitors::CBillboardSetEditorFactory::mBillboardTypes": definition of dllimport function for static members not allowed
(Not the actual message, but translated)