Re: [Cppcms-users] feedback after testing cppcms svn trunk compiled with msvc2005
Brought to you by:
artyom-beilis
From: Cristian O. <one...@gm...> - 2011-01-20 13:23:49
|
On Thu, Jan 20, 2011 at 2:31 PM, Artyom <art...@ya...> wrote: >> AFAICT from looking at libfcgi and mod_fastcgi code mod_fastcfg places >> the shutdown event handle in the client's environment in the >> _FCGI_SHUTDOWN_EVENT_ variable. As I've said I've taken the code from >> libfcgi\os_win32.c >> (www.fastcgi.com/dist/fcgi-2.4.1-SNAP-0910052249.tar.gz), it works so >> it means that is can be shared between parent and child processes. >> > > Ok, I'll take a look on this. > >> > >> > The internal boost is not only subset of boost but rather >> > renamed version of it (namespace boost -> namespace cppcms_boost) >> > >> > These ifdefs should go in any case. >> >> It's good to know this. But boost is not a runtime dependency meaning >> that after building cppcms if I use boost in the application linked >> with cppcms I don't need to use the same version of boost, am I >> correct? >> > > Not correct. > > For example you use in cppcms > > boost::foo() - from boost 1_36 > > This symbol is defined in cppcms.lib (assuming it is statically linked) > > Now you are using boost_1_45 and you use boost::foo() as well and > new boost::foo() is not binary compatible with 1_36 > > Now linker may actually use the boost::foo from cppcms and not from the > header you compiled with (and this actually happens). > > Now more then that if you use shared object under Unix it would > happen with them as well. It is quite easy to show how programs > using different versions of boost::regex in same code base > crash. > > So no you can't - even if the symbols are inline symbols and the library > is header only. Because compiler may create non-inlined weak symbols > and share them at link stage (and this really happens) in order to reduce > the size of the code. > > Read this for more details: > > > http://stackoverflow.com/questions/836875/creating-library-with-backward-compatible-abi-that-uses-boost > > > Regards, > Artyom Then this means that cppcms must be compiled with the same version of boost as the application. Doesn't this imply usage of an external boost (the one that is shared with the application)? And you just said that using an external boost is not going to be supported anymore. I'm thinking of using the external boost feature only to compile cppcms and the application with the same version of boost (not the opposite that you are trying to avoid). Using an internal version of boost is what really opens the door for an application to use a different version of boost then the one cppcms uses. By the way which is the minimum version of boost which can be used to compile cppcms? Thanks, Cristian |