<div dir="ltr">Hi,<div><br></div><div>this was discussed while ago for different versions of Visual Studio and there was a work around (which was not forcing to use force:multiple). Might be worth to look in the archive</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 8, 2016 at 10:52 AM, Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi James,<br>
<br>
I haven't dived into the details yet, but I strongly advertise for a fix, since this is a great polluter in our build-process too (Visual studio doesn't let you filter some warnings).<br>
<br>
<br>
Cheers<span class="HOEnZb"><font color="#888888"><br>
Sebastian</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
With recent MSVC versions, we’re obliged to use /FORCE_:MULTIPLE, to work around the fact that osgDB.lib includes symbols from std::fstream classes, which then causes conflicts when other object files in a target (eg executable) being linked use <fstream> classes. This slows down linking since incremental linking is disabled, and makes our build output very noisy.<br>
<br>
After some discussion, I came up with the following fix:<br>
<br>
<a href="https://github.com/zakalawe/osg/commit/2098c022283f1afeb4bad0ffb4b682b884cc8f32" rel="noreferrer" target="_blank">https://github.com/zakalawe/os<wbr>g/commit/2098c022283f1afeb4bad<wbr>0ffb4b682b884cc8f32</a><br>
<br>
The idea is to only export the non-inlined symbols from osgDB::ofstream and ::ifstream, but not to export the entire class, since doing so forces MSVC to also export the constructor and destructor for the base class (std::ofstream and std::ifstream).<br>
<br>
Since we don’t use the osgDB versions of fstream in FlightGear, I can’t check if this is backwards compatible for other Windows OSG users, but I am hopeful that it is, and hence that this approach could be upstreamed.<br>
<br>
Kind regards,<br>
James<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
</blockquote>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>