[osg-users] Build Error on Windows

Mark Sciabica msciabica at itracs.com
Tue Mar 24 10:42:40 PDT 2009


Hi Robert,

The versioning of the dll's doesn't completely solve the problem. I have 
customized OSG for my application, changing the public interface in a 
way such that the objects are not binary compatible with vanilla OSG. 
Linking dll's without my customizations can cause crashes. I install my 
customized build into a private directory in an attempt to avoid this 
problem. However, this "feature" thwarts my efforts.

And this problem affects more than just those who customize OSG. On 
Windows, we also need to contend with compatibility between builds from 
different compiler versions, and compiler options (e.g. linking debug 
vs. release or static vs dynamic runtime libraries). If two applications 
are installed, both using OSG 2.8.0, they need to be built with the same 
compiler version and same options or problems will ensue as they use the 
same path to load plugins.

Mark

Robert Osfield wrote:
> Hi Mark,
>
> Removing this entry will force more applications to explicitly put the 
> path to the osgPluigins directory.  It doesn't override anything, so 
> if you wanted to the move the library afterwards then you could but 
> you'd have to specify the new path - that would only take you make to 
> position of not having this inbuilt function at all.
>
> As for it being dangerous, well the OSG versions it's dll's + so's and 
> it versions the plugins directory, so the danger is not a real one.
>
> Robert.
>
> On Mon, Mar 23, 2009 at 9:47 PM, Mark Sciabica <msciabica at itracs.com 
> <mailto:msciabica at itracs.com>> wrote:
>
>     Hi Robert,
>
>     Sorry, I thought it would have been clear from my first e-mail.
>     I'll try again.
>
>     FileUtils.cpp in osgDB has this code.
>
>     static void
>     appendInstallationLibraryFilePaths(osgDB::FilePathList& filepath)
>     {
>     #ifdef OSG_DEFAULT_LIBRARY_PATH
>
>       // Append the install prefix path to the library search path if
>     configured
>       filepath.push_back(ADDQUOTES(OSG_DEFAULT_LIBRARY_PATH));
>     #endif
>     }
>
>     osgDB's CMakeLists.txt has this line:
>
>
>      
>     ADD_DEFINITIONS(-DOSG_DEFAULT_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX}/${OSG_PLUGINS})
>
>     This means that the install path configured at build time will be
>     searched for plugins. This does not make sense for prebuilt
>      binaries because the install location will likely be different on
>     different machines. I propose removing the function
>     appendInstallationLibraryFilePaths, and also the line in
>     CMakeLists since it is only this function that makes use of it.
>
>     Mark
>
>
>     Robert Osfield wrote:
>
>         On Mon, Mar 23, 2009 at 7:37 PM, Mark Sciabica
>         <msciabica at itracs.com <mailto:msciabica at itracs.com>
>         <mailto:msciabica at itracs.com <mailto:msciabica at itracs.com>>>
>         wrote:
>
>
>            Thanks for the reply. I'll be upgrade CMake for my next
>         build of
>            OSG. But do you have any comment on the final paragraph of my
>            e-mail? Embedding the install path configured when OSG is built
>            only makes sense if OSG is not distributed in binary form.
>
>
>         You'll need to be far more specific about what you are talking
>         about for me to comment.
>
>         Robert.
>
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         osg-users mailing list
>         osg-users at lists.openscenegraph.org
>         <mailto:osg-users at lists.openscenegraph.org>
>         http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>          
>
>
>     _______________________________________________
>     osg-users mailing list
>     osg-users at lists.openscenegraph.org
>     <mailto:osg-users at lists.openscenegraph.org>
>     http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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