[gccsdk] GCC 4.7.4 errors

Lee Noar leenoar at sky.com
Mon Nov 30 12:35:07 PST 2015

On 30/11/15 20:01, alan buckley wrote:
> Lee Noar wrote on Mon, 30 Nov 2015 17:32:31 +0000
>  > Subject: Re: [gccsdk] GCC 4.7.4 errors
>  >


>  > It's more a case of how does make decide which compiler to use.
>  > Normally, it's the source file suffix that determines it, so
>  > file.c would cause make to invoke the rule for .c files which
>  > would call the C compiler (gcc) and file.cpp would invoke the rule
>  > for .cpp files which would call the C++ compiler (g++).
>  >
>  > It sounds like the project _is_ pure C and should be compiled
>  > as pure C, but for some reason the C++ compiler is incorrectly
>  > being called for one or more files.
>  >
>  > If you can zip up the project and email it to me, I'll have
>  > a look and see if I can spot what's going wrong.
>  >
> I don't know if it is relevant on RISC OS, but on linux I have
> occasionally had a problem where if the suffix was a capital
> c (i.e. file.C) it would compile it as c++.

That's a good point that I hadn't thought of, but I've now tried
the project that Gavin sent me, and the files are in a 'c' directory
rather than a 'C' one. It builds correctly for me on my RPi, so perhaps
Gavin has a fault in his installation somewhere.


More information about the gcc mailing list