Re: Using gtkmm with Visual C++ and _SECURE_SCL=0
- From: Armin Burgmeier <armin arbur net>
- To: Thomas Frank <thomas-frank gmx de>
- Cc: gtkmm-list gnome org
- Subject: Re: Using gtkmm with Visual C++ and _SECURE_SCL=0
- Date: Mon, 20 Oct 2008 20:47:43 +0200
On Mon, 2008-10-20 at 11:11 +0200, Thomas Frank wrote:
> Hallo Armin.
> Thanks a lot for your response.
> 1. In Visual-C++ the _SECURE_SCL-flag enables some special security
> checks within the STL-Container-templates. This means among others
> that the base-classes for all iterators get an additional member, a
> pointer to the referenced container. This pointer in turn is used to
> make additional runtime-checks, if an iterator is actually pointing
> into the container it is used with. To my opinion this is quite useful
> in debug-mode, but for release-versions, these checks can easily slow
> down the performance of programs by 10-20% and more, depending on the
> algorithms used. Since _SECURE_SCL=0 removes the additional
> pointer-member from the iterators, the binary-compatiblility with
> libraries in 'secure-mode' is broken. Anyway. MS has decided to make
> _SECURE_SCL=1 the default, for both release- and debug-mode. Which
> leads me to...
> 2. I totally agree with pre-built libraries compiled with the
> default-settings of a compiler. I did not really expect an additional
> customized build for my purposes. That's why I asked for a known
> workaround. It could be that sigc++ is the only source of problems,
> since it exchanges iterators in its interface (signal::connect()). If
> so, I would mail to their list, but I do not really know if there is
> other items somewhere in the libraries that are also affected and I
> cannot double-check the complete code...
> 3. I found the instructions on
> http://live.gnome.org/gtkmm/MSWindows/BuildingGtkmm . But I would
> rather like to rebuild exactly the libs and dlls, that come with the
> installer-packages. Where can I find out, which packages of libsigc++,
> glibmm, cairomm, pangomm and gtkmm were exactly used for the
The DLLs have a version resource that shows the Version in the Windows
explorer when viewing the DLLs, or by choosing Properties on a DLL. The
only exception to this is libsigc++ which has been built from SVN since
there was no release with updated MSVC project files when the latest
installer was built.
> The idea is, if I rebuild exactly the same versions, I could just
> exchange the release-libs and -dlls of the standard gtkmm-installation
> and are finished.
> Maybe there is even a complete VisualC++-Workspace (sln) for all C
> ++-libraries at once, that could be released along with the
There is no such solution yet, but I think this is a good idea. The only
problem that I see is that this solution file needs to know the path to
the libsigc++, glibmm, cairomm etc. source code, even if we ship it with
> Any aid in building a 'patch' for the installers would be welcome.
The installer sources are in gtkmm SVN in the win32_installer directory.
Adding a file that the installer is supposed to install is easy (if this
is what you are looking for), just look how it's done for the existing
files in gtkmm-installer.nsi.in, and remember to also add it to the
] [Thread Prev