Hi Robert,

The issue is a combination of the plugin subdirectory and the search
rules used by Microsoft "manifests" to locate "assemblies", all part of
MS's plan to eliminate DLL Hell by introducing another layer of
complexity.  Whereas in VC2003 you could get away with just copying the
runtime DLLs and be done, with VC2005 you need assemblies and manifests.
MS's license terms for restributing their runtime libraries necessitates
some of this complexity...

My understanding is that assemblies are searched in several locations:
1) in the directory of the binary depending upon them (a private
assembly)
2) from the system-wide shared "WinSxS" pool of public assemblies
3) from the PATH envar

For the standard OSG binaries, the win32 installer puts a private copy
of the VC runtime library redist assemblies in the bin directory, so
they are resolved via rule #1.

Due to the plugins being in a separate directory, we need a way for the
plugins to also locate their assemblies.
- I dismissed the idea of putting yet another identical copy of the
private assemblies in bin/osgPlugins-2.2.0, so option #1 was out.
- option #2, which MS advocates, requires running their redist
installer, which itself needs admin permission.  I did not want to
impose user restriction.
- That leaves option #3, and so the new OSG_PATH envar is predefined by
the installer to provide paths to the executables, as well as the OSG
copies of the private assemblies. It looks like this:

OSG_PATH=C:\Program Files\OpenSceneGraph\bin;C:\Program
Files\OpenSceneGraph\bin\Microsoft.VC80.CRT;C:\Program
Files\OpenSceneGraph\bin\Microsoft.VC80.MFC

So to run OSG binaries, one needs to cause this to happen:
        set PATH=%OSG_PATH%;%PATH%

I dread what new "solutions" are coming with VS2008 :-P

cheers
-- mew



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Robert Osfield
> Sent: Thursday, November 29, 2007 11:08 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] DynamicLibrary::failed loading
> 
> Hi Mike,
> 
> On Nov 29, 2007 5:01 PM, Mike Weiblen 
> <[EMAIL PROTECTED]> wrote:
> > For Wndows to find all the necessary components, you must add the 
> > contents of OSG_PATH (not OSG_ROOT) to your PATH; eg
> >         set PATH=%OSG_PATH%;%PATH%
> > (You'll note that is the very first thing that osgShell.bat does)
> >
> > Unique from previous version of the OSG binaries, OSG_PATH actually 
> > contains *several* directories, which is necessitated by the plugin 
> > subdirectory filesystem structure and Microsofts assembly/manifest 
> > search process.
> >
> 
> I'm curious by the need for multiple PATH entries, I was 
> expecting the new plugin scheme to avoid the need altogether 
> for needing to specify the path to the plugins - only the 
> path to the parent directory is required, which also should 
> be where the libs themselves are located.
> Could you explain a bit more what paths you need to set and 
> an example of it so I can understand the issues better.
> 
> Cheers,
> Robert.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
> negraph.org
> 
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to