Custom gcc installation include files

Siddhartha Jain
Wed Jun 24 18:38:00 GMT 2015

Hm I see. I'm trying to compile Qt and I'm getting the error

In file included from
                 from project.h:45,
                 from project.cpp:42:
/usr/include/string.h:548:5: error: ‘__locale_t’ has not been declared
     __locale_t __loc)

there are a couple of other similar errors but this is the first one
and I thought it might be because the system gcc is 4.4.7 and it's
using the executable for gcc 4.8.1


On Wed, Jun 24, 2015 at 12:43 PM, Jonathan Wakely <> wrote:
> On 24 June 2015 at 11:56, Siddhartha Jain wrote:
>> Hi,
>> I have a custom installation of gcc 4.8.1 in my home directory.
>> However the include files in that installation have no extensions!
>> (except for tgmath.h, fenv.h, complex.h, and cxxabi.h)
> Which files are you talking about?
> Most C++ Standard Library headers do not have extensions, so that's normal.
>> Thus even if I include the installation include directory (for me
>> under include/c++/4.8.1) in C_INCLUDE_PATH, it still goes to the
>> system-wide gcc include files.
> You should never need to add GCC's own include directories to its
> search paths, it looks there automatically. So you're doing something
> wrong.
>> Why do the include files in the gcc install not have extensions and
>> will renaming them to have a .h extension fix the problem?
> What problem?
> Most C++ headers are not supposed to have extensions, so renaming them
> is not going to help.
> It sounds like you have some problem compiling something and are
> confused about C++ headers, but it's hard to tell. Please describe the
> symptoms of the problem, not what you think is causing it.
> What are you trying to do?
> What errors are you getting?

More information about the Gcc-help mailing list