Error building date_time and ICE with multi_index

Hi All! I'm currently starting to use more of boost, including libs that need compiling. Namely date_time. I first of all have to thank you for creating boost. It really boosts c++ development so much. And it is amazing what can be done with c++ templates. I'm having problems linking the date_time lib. I'm using the vc-7_1-stlport config. In the debug build everything is fine. But no libs are build for release mode. At least there are none w/o the g in their name in the stage/lib folder. The pragma comment lib stuff complains when building my program about not being able to find libboost_date_time-vc71-mt-p-1_32.lib. And indeed, it is not there. I'm using this cmd-line to build date_time ..\..\build\bjam.exe -sTOOLS=vc-7_1-stlport "-sBUILD=<define>BOOST_NO_STD_WSTRING" "-sSTLPORT_4.6.2_PATH=D:\Alexander.Jasper\hlf\OpsMan-2\tao146_port\thirdparty\stlport" "-sstlport-iostreams=on" --with-date_time stage after building stage/lib contains these files 18.07.2005 14:39 53.248 boost_date_time-vc71-mt-gdp-1_32.dll 18.07.2005 14:39 22.400 boost_date_time-vc71-mt-gdp-1_32.lib 18.07.2005 14:39 22.400 boost_date_time-vc71-mt-gdp.lib 18.07.2005 14:39 951.040 libboost_date_time-vc71-mt-gdp-1_32.lib 18.07.2005 14:39 951.040 libboost_date_time-vc71-mt-gdp.lib I have attached the bjam output to this email. But I can't find any error messages in there. Does anybody have an idea what is could be going wrong here? Thank would be great. And thanks a lot in advance. I have another issue with VC 7.1 with the multi_index lib. If I use it in conjunction with a smart_ptr it gives me an ICE. Does anybody know if that's a known bug of VC? Fixed in 8.0? To be specific this code fails: typedef boost::multi_index::multi_index_container< boost::shared_ptrps::Activity, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag<id>, BOOST_MULTI_INDEX_CONST_MEM_FUN(ps::Activity,unsigned int,getId)>, boost::multi_index::ordered_non_unique< boost::multi_index::tag<date>,BOOST_MULTI_INDEX_CONST_MEM_FUN (ps::Activity,boost::posix_time::ptime,getBegin)> > > TLegCache; It works ok with a regular pointer. This is supposed to work, isn't it? I have not yet tried with gcc. Another thing is that it consistently crashed with another class being index. Even with a regular pointer in that case. The typedef and the class are almost the same as above. The getter functions are const and return objects by value. I simply don't get it. This damn VC. My first impression was that things got A LOT better with 7.1. But apparently I'm wrong. Or is my code broken, after all? Thanks in advance for any hints or work arounds. kind regards Alex

On Mon, 18 Jul 2005 22:21:28 +0200, Jasper, Alexander wrote
Hi All!
I'm currently starting to use more of boost, including libs that need compiling. Namely date_time. I first of all have to thank you for creating boost. It really boosts c++ development so much. And it is amazing what can be done with c++ templates.
I'm having problems linking the date_time lib. I'm using the vc-7_1- stlport config. In the debug build everything is fine. But no libs are build for release mode. At least there are none w/o the g in their name in the stage/lib folder. The pragma comment lib stuff complains when building my program about not being able to find libboost_date_time-vc71-mt-p-1_32.lib. And indeed, it is not there.
I'm using this cmd-line to build date_time
..\..\build\bjam.exe -sTOOLS=vc-7_1-stlport "- sBUILD=<define>BOOST_NO_STD_WSTRING" "- sSTLPORT_4.6.2_PATH=D:\Alexander.Jasper\hlf\OpsMan- 2\tao146_port\thirdparty\stlport" "-sstlport-iostreams=on" --with- date_time stage
Well I'm not sure, but there have been build issues with vc7_1/stlport/date-time. Mostly revolving around wide char handling -- which it appears you've already turned off. This comes up enough that we wrote it up in the new version of the docs, but it doesn't seem likely that this is the problem, but just in case have a look at: http://engineering.meta-comm.com/resources/cs-win32_metacomm/doc/html/date_t... I'm afraid I don't have any other suggestions... Jeff

Jeff Garland wrote: <skip>
I'm having problems linking the date_time lib. I'm using the vc-7_1- stlport config. In the debug build everything is fine. But no libs are build for release mode. At least there are none w/o the g in their name in the stage/lib folder. The pragma comment lib stuff complains when building my program about not being able to find libboost_date_time-vc71-mt-p-1_32.lib. And indeed, it is not there.
I'm using this cmd-line to build date_time
..\..\build\bjam.exe -sTOOLS=vc-7_1-stlport "- sBUILD=<define>BOOST_NO_STD_WSTRING" "- sSTLPORT_4.6.2_PATH=D:\Alexander.Jasper\hlf\OpsMan- 2\tao146_port\thirdparty\stlport" "-sstlport-iostreams=on" --with- date_time stage
Well I'm not sure, but there have been build issues with vc7_1/stlport/date-time. Mostly revolving around wide char handling -- which it appears you've already turned off. This comes up enough that we wrote it up in the new version of the docs, but it doesn't seem likely that this is the problem, but just in case have a look at:
http://engineering.meta-comm.com/resources/cs-win32_metacomm/doc/html/date_t...
I'm afraid I don't have any other suggestions...
I'm not sure if it is relevant but I've just rebuilt the last cvs update and the full set of libboost-date_time* libs is built for vc-7_1 without STLPort. And I had problems building and using boost::date_time without /Zc:wchar_t switch. Still, it's a great and useful lib! -- Serge

On Mon, 18 Jul 2005 22:21:28 +0200, Jasper, Alexander wrote:
Hi All!
I'm currently starting to use more of boost, including libs that need compiling. Namely date_time. I first of all have to thank you for creating boost. It really boosts c++ development so much. And it is amazing what can be done with c++ templates.
I'm having problems linking the date_time lib. I'm using the vc-7_1-stlport config. In the debug build everything is fine. But no libs are build for release mode. At least there are none w/o the g in their name in the stage/lib folder. The pragma comment lib stuff complains when building my program about not being able to find libboost_date_time-vc71-mt-p-1_32.lib. And indeed, it is not there.
I'm using this cmd-line to build date_time
..\..\build\bjam.exe -sTOOLS=vc-7_1-stlport "-sBUILD=<define>BOOST_NO_STD_WSTRING" "-sSTLPORT_4.6.2_PATH=D:\Alexander.Jasper\hlf\OpsMan-2\tao146_port\thirdparty\stlport" "-sstlport-iostreams=on" --with-date_time stage
Modify your BUILD variable setting to include "release": "-sBUILD=release <define>BOOST_NO_STD_WSTRING" This worked for me. Bart Garst
participants (4)
-
Bart
-
Jasper, Alexander
-
Jeff Garland
-
Serge Skorokhodov