I have verified the build mode for all ingoing libraries.

I build all the dependencies myself. Including OSG.

The problem I have (which is OSG related), is that if I build without OSG
support (no rendering), it all works.
And I still use std::ostringstream and std::stringstream quite
extensively...
We still link against OpenThreads (but no rendering).


So only when I link against osg (osg.lib, osgDB.lib, osgText.lib,
osgShadow.lib, osgViewer.lib osgGA.lib) I get this problem.

I have verified that osg (and OpenThreads) are all built consistently all
over the field. Release and /MD (MultiThreadedDLL), which is default from
CMake.


So I can use/link against OpenThreads.lib, but not OSG...

Rather nasty problem, I'm trying to reduce it, but I'm getting nowhere.
And once again, same settings, same CMake version, same code all over the
place, and it works in VS2008...

/A

On Thu, Aug 26, 2010 at 8:17 PM, Simon Hammett
<[email protected]>wrote:

> Ah ok, then next things to check:
>
> Make absolutely sure you aren't mixing up objects & libraries from the
> different builds.
> For my projects I include a vc version number in the name, so
> .vc7.lib/vc7.dll & .vc9.lib/.vc9.dll
> and I also use the vc version in the name of output & intermediate
> directory
>
> Then check all the code for any use of
>
> #pragma comment(lib, "libname")
>
> and make sure any preprocessor guards that select different versions have
> been updated to know about vc2010.
>
>
>
> On 26 August 2010 18:37, Anders Backman <[email protected]> wrote:
>
>> Well, I have verified that ALL the dependencies Im using are all built
>> with /MD and NOT debug.
>> Im building all of the dependencies for osg and our lib myself, so I got
>> full control.
>>
>> Also, as I wrote before, I have even tried to build our libs using project
>> files generated from cmake > vs2008, build with vs2008 ->  works ok.
>> Open same project files in vs2010 -> problem occurs.
>>
>> Im using buildscripts to build dependencies, and it all works for
>> vs2008...
>> No external libraries, everything is built from code.
>>
>> For VS2010, all the dependencies (including osg 2.8.3) builds/links fine.
>> But for my libs, I get the linking errors.
>>
>> Allowing multiple symbols sounds dangerous, and it did not resolve my
>> problem...
>>
>> /A
>>
>> On Thu, Aug 26, 2010 at 7:26 PM, Simon Hammett <
>> [email protected]> wrote:
>>
>>>
>>>
>>> On 26 August 2010 17:35, Anders Backman <[email protected]> wrote:
>>>
>>> <snip>
>>>
>>>
>>>  CMake defaults to /MD code generation (MultiThreaded). Im using this
>>>> consistently over all my libraries (just double checked to be sure).
>>>>
>>>
>>> Never use that setting unless you know what you are doing.
>>>
>>> Change every project to
>>>
>>> Multi-threaded Debug DLL (/MDd) for Debug builds and
>>> Multi-threaded DLL (/MD) for Release builds
>>>
>>> And it will all start working.
>>>
>>> Those Runtime library settings are the number one 'gotch-ya' for Visual
>>> studio, and Cmake defaulting to them is daft.
>>>
>>> --
>>> http://www.ssTk.co.uk
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>>
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> --
> http://www.ssTk.co.uk
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to