does not include stddef.h

Home Forums Forum does not include stddef.h

This topic contains 7 replies, has 2 voices, and was last updated by  rich 6 years, 3 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4372

    Marty

    Hi All;
    when trying to run ellcc ecc against gcc, gcc works fine and produces output code and elcc gives an error..
    [marty@localhost home]$ gcc echo.c -o echo -Wall -std=c99
    [marty@localhost home]$ ./echo

    [marty@localhost home]$ rm /home/echo
    [marty@localhost home]$ ecc echo.c -o -Wall -std=c99
    In file included from echo.c:1:
    /usr/include/stdio.h:33:11: fatal error: ‘stddef.h’ file not found
    # include <stddef.h>
    ^
    1 error generated.
    Is this a Bug or do I need to update something ??
    THANK YOU Marty

    #4374

    rich
    Keymaster

    Hi Marty,

    “ecc”, without any options, will use the system standard header files, the ones in /usr/include. I don’t understand why ecc can’t find stddef.h on your system. What version of Linux are you running?

    You can tell ecc to use its own supplied header files like this (assuming you are building for x86_64):
    ecc -target x86_64-ellcc-linux echo.c -o echo -Wall -std=c99

    I hope this helps.

    -Rich

    #4378

    Marty

    Hi Rich;
    Thank You for Your Answer, I will try it just as You have it and report back..
    I did go to the Fedora forum and they helped me find stddef.h which I coppied to the user file and the next problem, which was finding stdarg.h … and they got that straightened out as well..
    Then came a whole slew of errors, so, I will try your suggestion before copying that output to this forum..

    THANK YOU again Marty

    #4379

    Marty

    Hi Rich;
    I forgot to say in my last posting.. I have Fedora 20 on an I7 machine, which is x86-64..
    Yes, that Works !!!!!
    What I am wondering is, which option fixed it.. The -std=c99 OR the Target option ?? I can try Both, and see which or if both are needed.. I also need to report back to the Fedora forum, once I find out what works and what doesn’t..

    THANK YOU Marty

    #4380

    Marty

    Hi Rich;
    I tried Both and the std=c99 option does not have to be there to work..
    But, the Target option does have to be there. or it puts out a whole roomfull of errors..

    THANK YOU Marty

    #4381

    rich
    Keymaster

    Hi Marty,

    That’s very strange: I run Fedora 20 on an x86_64 and don’t have problems using the standard header files.

    The option that fixed things for you is the “-target” option. That tells ecc to run in “cross compile” mode so it uses its own header files and libraries instead of those supplied by the host system.

    -Rich

    #4383

    Marty

    Rich;
    Thank You for You reply and patience..

    THANK YOU Marty

    #4385

    rich
    Keymaster

    Hi Marty,

    All questions are welcome. Just ask!

    -Rich

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.