Errors Compiling date_time Serialization Headers w/ Gcc on Linux
Hi, I am new to the list. Appologies in advance if I'm posting something that's been already addressed, but I was unable to find anything related to it while searching the archives. I'm trying to use the date_time serialization headers in my application. I'm actually using the boost headers and libraries that came with the fedora core 3 linux distribution, and compiling with gcc 3.4.2. Including boost/date_time/time_serialize.hpp in my source gives me several compilation errors. I perused the time_serialize.hpp and greg_serialize.hpp headers and found places where the typename keyword was being used in front of class types that were simply qualified by namespace, as well functions where variables were used that weren't declared. I modified the headers to get it to compile, but would like to see if anyone else has been able to work around the problem in a less intrusive way? If need be I can post the patch files I created to a proper place. Below are the errors I was getting: g++ -g -I. -c parseAccessLog.cpp In file included from /usr/include/boost/date_time/posix_time/time_serialize.hpp :13, from logobject.hpp:11, from parseAccessLog.cpp:19: /usr/include/boost/date_time/gregorian/greg_serialize.hpp: In function `void boost::serialization::save(Archive&, const boost::gregorian::date_period&, unsigned int)': /usr/include/boost/date_time/gregorian/greg_serialize.hpp:150: error: no class template named `date' in `boost::gregorian' /usr/include/boost/date_time/gregorian/greg_serialize.hpp:150: error: invalid type in declaration before '=' token . . Repeated several times for similar condition through out greg_serialize.hpp . . /usr/include/boost/date_time/gregorian/greg_serialize.hpp: In function `void boost::serialization::load_construct_data(Archive&, boost::gregorian::nth_kday_of_month*, unsigned int)': /usr/include/boost/date_time/gregorian/greg_serialize.hpp:336: error: `pd' undeclared (first use this function) /usr/include/boost/date_time/gregorian/greg_serialize.hpp:336: error: (Each undeclared identifier is reported only once for each function it appears in.) . . Also repeated several times for similar condition . . In file included from logobject.hpp:11, from parseAccessLog.cpp:19: /usr/include/boost/date_time/posix_time/time_serialize.hpp: In function `void boost::serialization::save(Archive&, const boost::posix_time::time_period&, unsigned int)': /usr/include/boost/date_time/posix_time/time_serialize.hpp:131: error: no class template named `ptime' in `boost::posix_time' /usr/include/boost/date_time/posix_time/time_serialize.hpp:131: error: invalid type in declaration before '(' token . .
On Mon, 28 Mar 2005 17:46:26 -0800, Jalon, Arnon wrote:
Hi, I am new to the list. Appologies in advance if I'm posting something that's been already addressed, but I was unable to find anything related to it while searching the archives.
I'm trying to use the date_time serialization headers in my application. I'm actually using the boost headers and libraries that came with the fedora core 3 linux distribution, and compiling with gcc 3.4.2.
Including boost/date_time/time_serialize.hpp in my source gives me several compilation errors. I perused the time_serialize.hpp and greg_serialize.hpp headers and found places where the typename keyword was being used in front of class types that were simply qualified by namespace, as well functions where variables were used that weren't declared.
I modified the headers to get it to compile, but would like to see if anyone else has been able to work around the problem in a less intrusive way? If need be I can post the patch files I created to a proper place.
Please send me your patches (bartmann.nsd@gmail.com). I'm not getting the errors you've described in my initial tests. Also, what version of boost shipped with FC3? Was it 1.31 or 1.32? Thanks, Bart
On Mon, 28 Mar 2005 17:46:26 -0800, Jalon, Arnon wrote
I'm trying to use the date_time serialization headers in my application. I'm actually using the boost headers and libraries that came with the fedora core 3 linux distribution, and compiling with gcc 3.4.2.
...snip details
I modified the headers to get it to compile, but would like to see if anyone else has been able to work around the problem in a less intrusive way? If need be I can post the patch files I created to a proper place.
Thanks for the report/patches. Fixes are now checked into CVS. Jeff
participants (3)
-
Bart
-
Jalon, Arnon
-
Jeff Garland