OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Spam: Re: msvc90 dependencies


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Tanguy Fautre
Guest





PostPosted: Tue Dec 02, 2008 4:18 pm    Post subject:
Spam: Re: msvc90 dependencies
Reply with quote

Hi Brian,

Are you sure about Boost 1.36 defining _SCL_SECURE=0 and _HAS_ITERATOR_DEBUGGING=0? I just made a search with _SCL_SECURE on Boost 1.36 sources and came up with nothing.

Our experience with Visual Studio 2005 and higher is the following.

By default, in Debug, VC defines:
_HAS_ITERATOR_DEBUGGING=1
_SCL_SECURE=1

By default, in Release, VC defines
_HAS_ITERATOR_DEBUGGING=0
_SCL_SECURE=1


Defining _HAS_ITERATOR_DEBUGGING=1 *requires* linking with the Debug version of the C++ runtime (cf. MSDN doc).

As far as Boost is concerned, I know there has been some talk about disabling checked iterators in Release (i.e. _SCL_SECURE=0) on VC. But AFAIK currently it still uses the compiler defaults (and will probably keep it that way, unless explicitly asked by the user).

Our policy for compiling all our C++ libraries is to stick to VC defaults except for Release mode where we define _SCL_SECURE=0.

Quote:
From our experiences, this is a very subtle but yet dangerous area. Failure to make sure that all C++ libraries are compiled with the same defines for _HAS_ITERATOR_DEBUGGING and _SCL_SECURE has brought to us all kind of very subtle crashes/data corruptions (some of them were only discovered after months!).


Regards,

Tanguy


From: [mailto:] On Behalf Of Brian Stewart
Sent: Tuesday 02 December 2008 15:52
To: OpenSceneGraph Users
Subject: Spam: Re: msvc90 dependencies

Hi Mattias,

I have been meaning to do exactly what you have done, but have not gotten around to it. According to Microsoft, if your libraries have only plain C interfaces, and don't use STL internally, then you can get away with mixing libraries from different versions of their compiler. When I quickly looked over the third party libs for OSG they all seemed to be C (but I could have easily missed something), except for maybe the input device one, which we don't use, so we just used the VS8 third party libs while building OSG for VS9. But I have been meaning to get around to building everything for VS9, just to be safe. Are your binaries built with _SCL_SECURE=0 and _HAS_ITERATOR_DEBUGIING=0? This would only apply to C++ third party libs, but as J-S pointed out, it does cause binary incompatibilities, similar to those caused by mixing /MT and /MD binaries. We turn these two features off for performance reasons, and we recently discovered that boost 1.36.0 now hardwires them to off - so a
nyone linking with this version (or I assume a later version as well) of boost would need to build OSG and their own code with these two features disabled as well.
On Mon, Dec 1, 2008 at 7:33 PM, Mattias Helsing <> wrote:
Hi all,

I have seen in recent posts that people aren't aware of my set of
prebuilt binaries for vc90. It is here:

http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHelsing

It has been there since early sept.

A few people have requested that it be linked to from the win32
dependencies wiki page but I have refrained from poking Robert about
this since I know that Mike has a plan for msvc90. Until then the link
may be a good idea.

cheers
Mattias




------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Happy New Year to all OSG Users Chris Hanson General 0 Mon Jan 07, 2019 10:17 am View latest post
No new posts osg-users Digest, Vol 138, Issue 27 Zachary1234 General 0 Tue Jan 01, 2019 1:16 am View latest post
No new posts osg-users Digest, Vol 137, Issue 14 poweruserm@live.com.au General 0 Fri Nov 16, 2018 11:16 pm View latest post
No new posts General Users starting questions in O... A Z General 1 Mon Oct 15, 2018 3:59 am View latest post
No new posts osg-users Digest, Vol 136, Issue 8 jonasydy General 0 Wed Oct 10, 2018 12:40 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP