The problem was with user defined string literals in c++11:
https://gcc.gnu.org/gcc-4.7/porting_to.html

I've added some spaces and removed the for range loop so everything should
be fine now.



On Mon, Sep 8, 2014 at 1:22 AM, Aníbal <[email protected]> wrote:

> I believe that I am making something wrong ... can't figure what.
>
> I am making:
>
> $ qmake leocad.pro
>
> but a grep std Makefile don't return any hint ...
>
> On the date error, don't know if only happens to me, but the error
> appear to be related to adding std=c++11 to compilation flags ...
>
> What appears is that g++ don't like missing spaces between __DATE__
> and the other strings.
>
> This:
> printf("Compiled " __DATE__ "\n");
>
> don't give any error ...
>
>
>
>
> On Mon, Sep 8, 2014 at 6:44 AM, Leonardo Zide <[email protected]> wrote:
> > I checked in a change to enable c++11 a few days ago, did you run qmake?
> I'm
> > going to remove the for loop anyway since msvc 2010 doesn't like it
> either
> > and replace it with Qt's foreach macro.
> >
> > Strange that gcc is now complaining about DATE, that has been there for a
> > long time.
> >
> >
> > On Sunday, September 7, 2014, Aníbal <[email protected]> wrote:
> >>
> >> Hi,
> >>
> >> Compilation on Linux is failling on my Ubuntu 14.04 ( gcc 4.8.2)
> >>
> >> It returns the error:
> >>
> >> Error: Range-based 'for' loops are not allowed in C++98 mode
> >>
> >> I have modified the Makefile to pass flag -std=c++11 to be able to
> compile
> >> it.
> >>
> >> Don't know if is a problem when generating Makefile with qmake or is
> >> missing some flag on qmake configuration ...
> >>
> >> Other error that appears is the lc_application.cpp, don't know why but
> >> don't like __DATE__ in the middle of two static string ... patch
> >> bellow.
> >>
> >> Thanks for leocad.
> >>
> >> Regards,
> >> Aníbal
> >>
> >>
> >> Index: common/lc_application.cpp
> >> ===================================================================
> >> --- common/lc_application.cpp    (revision 1653)
> >> +++ common/lc_application.cpp    (working copy)
> >> @@ -212,7 +212,7 @@
> >>              else if ((strcmp(Param, "-v") == 0) || (strcmp(Param,
> >> "--version") == 0))
> >>              {
> >>                  printf("LeoCAD Version " LC_VERSION_TEXT "\n");
> >> -                printf("Compiled "__DATE__"\n");
> >> +                printf("Compiled %s\n", __DATE__);
> >>
> >>                  return false;
> >>              }
> >> _______________________________________________
> >> Leocad mailing list
> >> [email protected]
> >> https://list.gerf.org/listinfo/leocad
>
_______________________________________________
Leocad mailing list
[email protected]
https://list.gerf.org/listinfo/leocad

Reply via email to