I have a Ogre3D 1.7.x DLL wrapper project that explicitly loads Ogre functions and works ok using the OgreMain.dll + D3D9 Renderer plugin.dll which loads a mesh without any problems. This is my setup:
MyWrapper.dll OgreMain.dll D3D9Renderer.dll
When I switched to using a OgreMainStatic.lib configuration, where it is now a single DLL setup (MyWrapper.dll ~5MB, lib plugins linked and loaded) and loading a mesh with CreateEntity crashes the application.
I have tested linking my OgreMainStatic.lib on a single exe file then loading a mesh and it works without any problems.
Are there any changes or concerns in how Ogre handles memory or threading when wrapping functions and explicitly loading a DLL vs DLL using Ogre Static Lib?
I have added a crash reporting tool to dump the particular error and it throws out an exception of some sort:
The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Both solutions still shows the Ogre.log message that the mesh has loaded, but with the static lib linked DLL setup it crashes:
16:03:37: DefaultWorkQueue('Root') initialising on thread main. 16:03:37: Added resource location 'media' of type 'FileSystem' to resource group 'General' 16:03:37: Parsing scripts for resource group Autodetect 16:03:37: Finished parsing scripts for resource group Autodetect 16:03:37: Parsing scripts for resource group General 16:03:37: Parsing script box.material 16:03:37: Parsing script ground.material 16:03:37: Parsing script Ogre.material 16:03:37: Parsing script skybox.material 16:03:37: Finished parsing scripts for resource group General 16:03:37: Parsing scripts for resource group Internal 16:03:37: Finished parsing scripts for resource group Internal 16:03:37: Mesh: Loading sphere.mesh.