Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::filesystem exception not caught on MacOS X
From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-09-21 19:17:44


On Sun, Sep 21, 2008 at 1:30 PM, Brice Rivé <bricerive_at_[hidden]> wrote:
>
> I got a direct response from Lothar, which I am posting here for others:
>
>> Yes. The solution is to add the option -no_dead_strip_inits_and_terms to
>> the release configuration when building. It disables certain
>> optimisations which cause the error.
>>
>> See also
>>
>> http://lists.boost.org/boost-users/2008/03/34466.php

I'm not familiar with this particular problem but in general there are
no guarantees that a static object in a given cpp file will be
initialized unless a function from that cpp file is called directly.

This also means that the linker is free to kill all such static
objects, as well as everything they would have bootstrapped.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net