Re: [Boost-users] Re: gregoran::year_based_generator and mingw-3.4.2

[snip]
boost-users@lists.boost.org mailto:boost-users@lists.boost.org wrote:
"Antonio Coralles"
mailto:noche.suapie@reflex.at mailto:> wrote in message news:41EBE2F0.7020003@reflex.at... i'm writing on a programm which uses the boost date_time library [boost-version = 1.32.0] heavily; while i normally programm in linux using gcc-3.3.5 i also need to compile my program in windows from time to time. because it makes life easier with another library [gtkmm-2.4.8] i'm using mingw-3.4.2; everthing worked fine (my code contains about 10 000 lines using boost_date_time) until i started using a boost::gregorian::year_based_generator. while gcc-3.3.5 in liux accepts my code without even a single warning [with -Wall], mingw-3.4.2 complains - it seems that the compiler has problems with year_based_generator:
[snip] [snip]
Are you able to build the print_holidays example? It uses pointers to year_base_generators.
[snip]
i'll try that in the next time and post the results of this experiment; be the way, i've now compiled my app in win succesfully by putting evrything which is somehow connected to year_based_generator into #ifndef WIN32_COMPILE .... #endif. that isn't too bad for the moment, because i don't use these methods by now in other parts of my prog [except unit tests]. but sooner or later i will ...
[snip] i've now tried to compile the print_holidays example: this is what i got: $ g++ -lboost_date_time-mgw-1_32 print_holidays.cpp -o test.exe print_holidays.cpp: In function `int main()': print_holidays.cpp:43: error: `year_based_generator' undeclared (first use this function) print_holidays.cpp:43: error: (Each undeclared identifier is reported only once for each function it appears in.) print_holidays.cpp:43: error: template argument 1 is invalid print_holidays.cpp:43: error: template argument 2 is invalid print_holidays.cpp:43: error: invalid type in declaration before ';' token print_holidays.cpp:44: error: `push_back' has not been declared print_holidays.cpp:44: error: request for member of non-aggregate type before '( ' token print_holidays.cpp:45: error: `push_back' has not been declared print_holidays.cpp:45: error: request for member of non-aggregate type before '( ' token print_holidays.cpp:46: error: `push_back' has not been declared print_holidays.cpp:46: error: request for member of non-aggregate type before '( ' token print_holidays.cpp:53: error: `push_back' has not been declared print_holidays.cpp:53: error: request for member of non-aggregate type before '( ' token print_holidays.cpp:55: error: `push_back' has not been declared print_holidays.cpp:55: error: request for member of non-aggregate type before '( ' token print_holidays.cpp:57: error: `push_back' has not been declared print_holidays.cpp:57: error: request for member of non-aggregate type before '( ' token print_holidays.cpp:59: error: `push_back' has not been declared print_holidays.cpp:59: error: request for member of non-aggregate type before '( ' token print_holidays.cpp:64: error: template argument 1 is invalid print_holidays.cpp:64: error: template argument 2 is invalid print_holidays.cpp:64: error: expected `;' before '::' token print_holidays.cpp:65: error: `it' undeclared (first use this function) print_holidays.cpp:65: error: `end' has not been declared print_holidays.cpp:65: error: request for member of non-aggregate type before '( ' token ' token i've also tried to compile some other examples - they work, like the rest of my program; maybe there is something wrong with my installation - but i don't know what. it is also really strange that mingw accepts partial_date [in my app] which is derived from year_based_generator but refuses to work with year_based_generator*. antonio

On Tue, 18 Jan 2005 19:51:09 +0100, Antonio Coralles wrote: ...snip...
i've now tried to compile the print_holidays example: this is what i got:
$ g++ -lboost_date_time-mgw-1_32 print_holidays.cpp -o test.exe print_holidays.cpp: In function `int main()': print_holidays.cpp:43: error: `year_based_generator' undeclared (first use this function) print_holidays.cpp:43: error: (Each undeclared identifier is reported only once for each function it appears in.)
...snip...
i've also tried to compile some other examples - they work, like the rest of my program; maybe there is something wrong with my installation - but i don't know what. it is also really strange that mingw accepts partial_date [in my app] which is derived from year_based_generator but refuses to work with year_based_generator*.
antonio
I'm stumped. I tried upgrading to gcc/g++ 3.4 (I extracted these into my original mingw installation) and am unable to duplicate your errors. If you can spare the time, try downloading a fresh boost_1_32_0 archive and attempting a print_holidays compile with that source tree. I'm wondering if your source tree may have been corrupted somehow. Sorry I can't be of more help, Bart

On Tue, 18 Jan 2005 17:19:56 -0700, Bart wrote
i've also tried to compile some other examples - they work, like the rest of my program; maybe there is something wrong with my installation - but i don't know what. it is also really strange that mingw accepts partial_date [in my app] which is derived from year_based_generator but refuses to work with year_based_generator*.
antonio
I'm stumped.
I tried upgrading to gcc/g++ 3.4 (I extracted these into my original mingw installation) and am unable to duplicate your errors.
If you can spare the time, try downloading a fresh boost_1_32_0 archive and attempting a print_holidays compile with that source tree. I'm wondering if your source tree may have been corrupted somehow.
That would be my guess at this point too. The fact that the example fails means something is really off. I just compiled 1_32 with mingw dev-cpp with compiler version 3.3.1. The regression tests also succeed for your combination. More than likely it would have to be something messed up in boost/date_time/date_generators.hpp -- so you could try just getting the latest version of that file and replacing it. Jeff
participants (3)
-
Antonio Coralles
-
Bart
-
Jeff Garland