[osg-submissions] Plugin DLL search order fix for Win32
Jean-Sébastien Guay
jean-sebastien.guay at polymtl.ca
Fri Aug 24 07:05:21 PDT 2007
Hello Robert, Luigi,
>> I do wonder if it wouldn't be possible to build both the release and
>> debug plugins into the same directory as the debug plugins all have a
>> d postfix so there won't be any overlap.
>
> I' ll try a hack that have been suggestd on CMake user list to do that,
> prepending ../Debug to target name, using ../ is not considered the
> cleanest solution,thoug.
> If you think it would be viable, I can try to se if it works.
I don't see how building them in the same dir will change anything,
since anyways you're supposed to run the INSTALL target after the
build anyways, which copies the files to the right places (bin and
bin/osgPlugins-version for both debug and release).
>> Also is there any way to get the plugins directory to go into the bin
>> directory under Windows/MSVC? I presume CMake adds the lib
>> automatically. Is there any way such as using ../bin/ preprending the
>> target to fool it in doing what we want?
>
> I already tested it, it can be easily done, the only problem is name
> clashing pr .pdb files that VS produce:
> osviewer is both a library (.dll and .lib) as well as an executable
> (.exe) the corresponding .pdb file (debug info for VisualStudio) have
> the same name osgviewer.pdb for both the application as the library
> The sam happen for osgtext and osgmanipulator
> In order to properly build debug under the same bin folder is required
> to resolve the clashing. my solution was to append _exe to the .exe
> names (like osgviewer.exe --> osgviewer_exe.exe)
> I agree having windows build stuff all in the same bin folder would
> help running "out of the box" without adding lib/Debug to PATH and
> without installing
Why would you not want to install? Running the INSTALL build target
solves all this, and does not need any hacking nor any
osgviewer_exe.exe file names (which is absurd IMHO). Just run the
INSTALL target. Problem solved.
We've been over this a few times now on the list, I don't think it's
worth changing things and introducing ugly hacks for this.
>> My hope would be that we can build libs and bins all in roughly the
>> right place, without needing to install.
>
> If the design seems you to fit, let me know, I can try to test the
> "one-folder" build layout.
Under Linux, you run make install to copy the compiled files to the
right places, why is this any different under Windows? I don't see the
problem you're trying to solve.
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.guay at polymtl.ca
http://whitestar02.webhop.org/
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the osg-submissions
mailing list