Select to view content in your preferred language

Win32 vs2008 build with secure scl disabled

1872
1
10-26-2011 03:55 PM
SimonWood
Emerging Contributor
Hi,

I was wondering if there was any chance of making a visual studio 2008 build available, with secure scl disabled?

This is a Microsoft specific setting which adds some error checking to the STL containers and iterators (if I understand it correctly), which has the result of changing the size of the STL classes used.

Mixing dlls or objects compiled with a mixture of this setting can cause chaos and generally random behaviour

We are trying to link against both FileGDBAPI.DLL and another DLL that has scl disabled and are observing crashes in different locations (eg ~wstring). Same code works fine on linux and works when we comment stuff out and just link against FileGDBAPI.DLL



Thanks,
Simon

(We're also trying to see if we can get a scl enabled version of the other dll)


This secure scl setting is enabled by default in vs2008, so disabling would involve adding:
_SECURE_SCL=0
to the: C/C++ / Preprocessor definitions section in the visual studio project configuration
0 Kudos
1 Reply
LanceShipman
Esri Regular Contributor
We followed the default when we built the API. Secure scl is enabled by default in VS2008 and disabled in VS2010. You may want to consider moving to VS2010.
0 Kudos