[osg-users] DynamicLibrary::failed loading
Paul Speed
pspeed at progeeks.com
Sat Dec 1 00:24:30 PST 2007
I don't know if it matters in this case or not but on WinXP I had a
problem with spaces in paths. If I put OSG into a directly with a space
in it and then added that directory to my path: I would be able to run
osgviewer.exe but it would fail to find any of the DLLs. Moving it to a
directory without a space fixed it.
At the time, I couldn't find anything to make it work... but I didn't
try very hard either (since I had a work-around). It seemed like DLL
resolution was done differently than exe path resolution.
I could have been out of my mind, too.
-Paul
Mike Weiblen wrote:
> Interesting, thanks for the data. This is exactly the kind of situation
> I had intended my installer would solve, this is good feedback.
>
> fyi, the osgDB library explicitly does the loading of the osgdb_*.dll
> plugins, which is why there aren't problems finding and the plugins are
> found in their magic directory, etc. At issue is how the dependencies
> pulled in by the Windows runtime linker are found and loaded.
>
> (some backstory: this pathing garbage is all due to the licensing of the
> MS redist libraries. Other dependency libraries don't limit how they're
> put in the filesystem, so they can be located whereever's convenient.
> The MS runtime redist requires their subdirectory structure and naming
> be preserved. :-P)
>
> I'd really like to understand the root cause here, so the installer will
> Just Work. A couple more questiions:
> - this isn't Vista, is it?
> - exactly what's the machine config? (which OS, SP, etc? 32/64 bit?
> Is/was VS ever installed, which version?)
> - are you installing as admin or not?
> - are you running as admin or not?
> - where is OSG being installed? on a UNC share?
>
> The official MS-sanctioned sure-fire solution is to run the redist
> installer to put the runtime libs in the public shared assembly
> directory:
> C:\Program Files\Microsoft Visual Studio
> 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\vcredist_x86.exe
> That will require admin permission, but should bypass the whole private
> assembly pathing issue. If that doesn't work, there're bigger issues
> afoot.
>
> cheers
> -- mew
>
>
>
>
>
>
>> -----Original Message-----
>> From: osg-users-bounces at lists.openscenegraph.org
>> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf
>> Of Will Sistar
>> Sent: Thursday, November 29, 2007 4:55 PM
>> To: OpenSceneGraph Users
>> Subject: Re: [osg-users] DynamicLibrary::failed loading
>>
>> Well, here is what I have done so far.
>> I used Depends and found that it couldn't find the two
>> microsoft dir, so I added that to my path as you mentioned.
>> (still didn't work)
>> Uninstalled OSG and then reinstalled making sure to add the
>> environment variables to the registry. (I believe I did
>> before) Ran osgShell without any modifications and found
>> that it does in fact add %OSG_PATH% to the front of the
>> system path with the same directories listed as Mike
>> previously mentioned.
>> Tried "osgviewer cow.osg" again and it still didn't work.
>>
>> What is interesting is that when I manually load it doesn't
>> prepend the "osgPlugins-2.2.0" to the filename and it finds
>> and uses it with no problems. If I type in "osgviewer -l
>> osgPlugins-2.2.0/osgdb_osg.dll cow.osg" it finds the file but
>> still says it fails to load. If it were a dependency problem
>> wouldn't it have a problem loading the dll regardless of how
>> it found it? I am not saying it isn't a PATH issue but it
>> always seems to find the file, it just fails when it is
>> anywhere other than the \bin dir. I tried putting it in the
>> \system32 directory and try to manually load it and it finds
>> it there but fails to load.
>>
>> It works on one of my home pc just not my work one.
>>
>> Mike, this is where I started with setting up my env
>> variables. I think I may have entered one of them wrong
>> before which is why I removed everything and started over. I
>> then checked them against what you had in your email and they
>> matched.
>> http://www.openscenegraph.org/projects/osg/wiki/Support/Gettin
>> gStarted step 4. and
>> http://www.openscenegraph.org/projects/osg/wiki/Support/Platfo
>> rmSpecifics/VisualStudio
>> <http://www.openscenegraph.org/projects/osg/wiki/Support/Platf
>> ormSpecifics/VisualStudio> Environment Variables
>>
>>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
More information about the osg-users
mailing list