Boost logo

Boost :

Subject: Re: [boost] [Locale] Static locale initialisation
From: Artyom (artyomtnk_at_[hidden])
Date: 2010-04-11 11:05:40


> > 4. The last what parameters of CMake did you used when > you build > >    boost.locale library. > > I'm afraid I don't understand the question > I mean had you passed any special parameters to CMake when you configured the library? > I generated the single solution using CMake which puts a > debug and release > configuration in the same file.  This is how it's > supposed to work, right? > I didn't run CMake twice to create two seperate solutions. > Not really... CMake creates a solution for configured build. If you need two configurations rerun CMake and create different solution. See solution is not more then "makefile" or a way to build something. You do not change it, you rerun CMake. I'd suggest build libraries in clean way and add binaries to project rather then integrating project to solution. Think of using libraries created with bjam. > > I'm not using DLLs here!  My repro code does it with a > simple EXE.  All it > takes is a single static locale instance.  You are using ICU dlls. And you are using MSVCRT.DLL -- these are DLLs. > This may > even repro on Linux. Not sure, because what you are explaining is quite DLL related (I had some similar issues that were strictly Build+DLL related. > Where are these ids generated?  I tried to find it but > it seems that they > appear by magic :P Generally id class is something like that: class std::locale::id { public: id() : my_id_(counter++) {} int _get_id() const { return my_id_; } private: int my_id_; static int counter; }; libstdc++.cpp int std::locale::id::counter; (Of course just literally, because the counter is atomic counter and so on). So if class is not exported correctly or used different dlls counter may have more then one instance... and this is bad. -------------------------- Artyom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk