Stddef.h: no such file found in QT



  • Hello

    I have run into the problem with the QT 5.1 after trying to compile the simplest starting up C program @#include <stdio.h>

    int main(void)
    {
    printf("Hello World!\n");
    return 0;
    }
    @

    I get the following error

    @ stddef.h; no such file or directory _G_config.h
    /usr/include/_G_config.h
    @

    pic of problem: !http://imgur.com/4OtRkMf!

    Im using linux Unbuntu 11.04
    the compiler response
    @root@ubuntu:~# dpkg --list | grep compiler
    iU g++ 4:4.6.3-1ubuntu5 GNU C++ compiler
    iU g++-4.6 4.6.3-1ubuntu5 GNU C++ compiler
    ii gcc 4:4.6.1-2ubuntu5 GNU C compiler
    iU gcc-4.6 4.6.3-1ubuntu5 GNU C compiler
    iU gcc-4.6-arm-linux-gnueabi 4.6.3-1ubuntu5cross1.62 GNU C compiler
    ii libprotoc7 2.4.0a-2ubuntu2 protocol buffers compiler library
    ii protobuf-compiler 2.4.0a-2ubuntu2 compiler for protocol buffer definition files
    @

    I tried to check if the following file is in the system and got the following response:
    @root@ubuntu:~# locate stddef.h
    /usr/include/linux/stddef.h
    /usr/lib/gcc/i686-linux-gnu/4.6/include/stddef.h
    /usr/lib/syslinux/com32/include/stddef.h
    /usr/lib/syslinux/com32/include/bitsize/stddef.h
    /usr/src/linux-headers-3.0.0-12/include/linux/stddef.h
    /usr/src/linux-headers-3.0.0-12-generic/include/linux/stddef.h
    @

    Also I expect a lot of people just advising to run the
    @apt-get update and apt-get install build-essential@

    I have tried it, and it doesn't help. Please if somebody knows or had the same problem and was able to resolve it help me.



  • Hello,
    Did you try to compile it outside Qt? Type in terminal
    @gcc your_program.c@
    or
    @g++ your_program.cpp@

    If it doesn't compile with any of the commands, I would advise you to go to the Ubuntu forum. I don't think that this is related to Qt installation: it seems a problem in GCC configuration.

    One last thing: Did you run *updatedb *before using locate? You might have deleted one file and this wouldn't appear if you didn't refresh the data base.
    Hope this helps even though this not a solution. Regards,
    

    Pascom


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.