c++ - Compiling a DLL which includes Ogre3D gives an assertion error when used -


I have a framework that I am building and compiled in a stable library used by other projects. Used to be. The library works totally without issues. The problem is that the link time for projects using the library is very long, so I thought I would create a DLL project of the same structure. I started with the steps of the child and created an MFC DLL project through Visual Studio. The project has the following headings:

  /// ------------------------------ - ------------- #ifndef OGRECORE_H #define OGRECORE_H #ifdef OGREFW_EXPORT #define OGREFW_DLL __declspec (dllexport) #else #define OGREFW_DLL __declspec (dllimport) #endif class OgreRoot; Namespace OGREFW {class OGREFW_DLL OgreCore //: Public OIS :: KeyListener, Public OIS :: MoleList (Public: Ogrecor); ~ OgreCore (); }; }; #endif // OGRECORE_H  

and this is the source

  #include "stdafx.h" #include "OgreCore.h" // include "Ogre.h OgreRoot.h" // # includes "OgreRenderWindow.h" // # include "OgreLog.h" // # includes "OgreLogManager.h" // # includes "" / / # include "OgreOverlaykh" / / # "OgreViewportkh" // # "OgreRenderWindowkh" contains // # "OgreFrameListenerkh // include" // include # "OgreWindowEventUtilitieskh" # "OgreSceneNode .h "include // #" OgreEntity included h ogreManualObject.h "// # include" OgreMeshManager.h "// # include" OgreConfigFile.h "// # include" OgreOverlayContainer.h "/ Includes / # include "#" Are "OgreOverlayManager.h" Namespace OgreFW {OGREFW_DLL OGrecor :: Ogrecor () {} //} ------------------------ OgreffWDL Ogrecor :: ~ Ogrecor () {}} As you can see that I have commented in Ogre when a project uses the compiling DLL and it creates a class of Ogrekor. So, it works perfectly well. As soon as one of the Ogre is to be included in the DLL and compile, the project using DLL now tells an error. Full details can be found here in the Ogre Forum Post. I posted the first question there but since it's not really an Ogre specific question, I thought I would try it too. Ogrey Post's Link: 

Thanks in advance

< P> Finally got the solution

The short description is that DLL should make a non-MFCL DLL without DLL main, but the Visual Studio gives me the MFC DLL template.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -