Apps are linked against the plugin dll

OlRaygun

15-01-2009 15:11:05

I've noticed that Demo_PCZTestApp.exe is linked against PLUGIN_PCZSCENEMANAGER_D.DLL (somehow, wasn't able to find it in VC9 project Linker/Input/Additional dependencies, this is strange, however it IS linked).

I understand that the reason is that you have to call PCZSceneManager::init - I had to add PLUGIN_PCZSCENEMANAGER_D import library to my test application linker configuration in order to build it, too.

But is this normal? I mean, as a design decision - having to link against another lib, which I understand, is loaded dynamically by OgreMain anyhow (when you load plugins that is).. It just doesn't sit well with me.

Oh, and as it had been mentioned already somewhere (http://www.ogre3d.org/forums/viewtopic. ... 02#p307302), PCZ SM dll MUST be in the same directory where the executable is. Otherwise it wouldn't start at all.

Chaster

19-01-2009 16:50:15

Both are valid points. I'll put them on my mile long list of "todo" items, but I have serious time issues (I'm running a major project in my own company AND I'm working on another completely unrelated project in a pseudo-startup).

merlinblack

19-02-2009 23:03:09

Ah, that would be the reason for having to call it libPlugunPCZSceneManager.so rather than PluginPCZSceneManager.so to make it work on Linux.

What I can't figure out is how the sample program finds the library on Linux, where other programs i've made can't. /usr/local/lib/OGRE isn't one of the directory's ldconfig usually searches. I've resorted to copying the lib up a directory to /usr/local/lib. I guess for a user install, you could just put it in the same directory with the main exe.

Would it be better to use it as a normal library? You could still use the plugin interface from what I remember.

merlinblack