Error No Include Path In Which To Search For Stddef.h
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up error: no include path in which to search for stdio.h up vote 3 down vote favorite I used to be able to compile C programs, but now I can't: $ cat helloworld.c #include int main(void) { printf("Hello, world!\n"); return 0; } $ gcc helloworld.c helloworld.c:1:19: error: no include path in which to search for stdio.h Yes, I do have /usr/include/stdio.h . Yes, build-essentials is installed. This problem began after I modified my ~/.bashrc to run a program installed in my user directory. I know this is what's wrong because if I remove ~/.bashrc, it works. What environment variable would be shadowing /usr/include as an include path? c linux gcc bash share|improve this question asked Nov 21 '10 at 7:10 Joey Adams 19.1k85591 4 Pasting the contents of your .bashrc would be helpful. –cdhowie Nov 21 '10 at 7:12 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted The problem was that I had another GCC in my PATH: $ which gcc /home/joey/gcc4ti/bin/gcc When I was trying to compile "Hello World", it was running a compiler for a 68000, not my system compiler :D I had this in my ~/.bashrc: export PATH="/home/joey/gcc4ti/bin:$PATH" Because paths are scanned in order, the gcc in /home/joey/gcc4ti/bin is seen first. I changed it to: export PATH="$PATH:/home
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible with some types of ads) More information about our ad policies X You seem to have CSS turned off. Please don't fill out this field. You seem to have CSS turned off. Please don't fill out this http://stackoverflow.com/questions/4236827/error-no-include-path-in-which-to-search-for-stdio-h field. Briefly describe the problem (required): Upload screenshot of ad (required): Select a file, or drag & drop file here. ✔ ✘ Please provide the ad click URL, if possible: Home Browse MinGW-w64 - for 32 and 64 bit Windows Mailing Lists MinGW-w64 - for 32 and 64 https://sourceforge.net/p/mingw-w64/mailman/message/19399388/ bit Windows A complete runtime environment for gcc Brought to you by: jon_y, ktietz70, nightstrike Summary Files Reviews Support Wiki ▾ Wiki Wiki2 Mailing Lists Tickets ▾ External Testsuite Failures Bugs Support Requests Patches (Obsolete, use public Mailing List) Feature Requests News Discussion Donate Code Git ▾ web ironcrate mingw-w64 portablexdr mingw-w64-documentation mingw-w64-ironcrate mingw-w64-public mingw-w64-svn Re: [Mingw-w64-public] Cannot #include Re: [Mingw-w64-public] Cannot #include From: Sisyphus - 2008-05-19 02:31:20 ----- Original Message ----- From: "NightStrike" . . >> C:\_64>gcc -o try.exe try.c -v >> Using built-in specs. >> Target: x86_64-pc-mingw32 >> Configured with: >> ../build/gcc-svn/gcc/configure --target=x86_64-pc-mingw32 >> --pre >> fix=/var/tmp/w64 --with-sysroot=/var/tmp/w64 --host=x86_64-pc-mingw32 >> Thread model: win32 >> gcc version 4.4.0 20080507 (experimental) (GCC) >> COLLECT_GCC_OPTIONS='-o' 'try.exe' '-v' '-mtune=generic' >> cc1 -quiet -v -iprefix >> c:\_64\../lib/gcc/x86_64-pc-mingw32/4.4.0/ try.c -quiet >> -dumpbase try.c -mtune=generic -auxbase try -version -o ./ccX0Z06C.s >>
path msys FIXME: Page under construction; mostly complete now, but may need some clarifications. I will add to this as time http://www.mingw.org/wiki/includepathhowto permits; please bear with me. My intent is to provide answers https://gcc.gnu.org/ml/gcc-bugs/1999-06n/msg00171.html to some remarkably similar, but independently asked, questions which have appeared recently, on the MinGW-Users and MinGW-MSYS lists. Introduction This Mini-HOWTO attempts to answer the FAQ: "Why can't the MinGW compilers find my project's header files?" The CPP Section of the GCC Manual indicates that error no header files may be located in the following directories:-- On a normal Unix system, if you do not instruct it otherwise, [GCC] will look for headers requested with #include in: /usr/local/include libdir/gcc/target/version/include /usr/target/include /usr/include For C++ programs, it will also look in /usr/include/g++-v3, first. Of course, the MinGW ports of GCC target Microsoft's Windows system, which error no include is not a "normal UNIX system". Nevertheless, many users, particularly those coming from a UNIX or GNU/Linux background, and especially when they use MSYS to emulate a UNIX file system model on their MS-Windows hosts, are surprised to find that MinGW, using its default configuration, does not automatically search for header files in these directories. MinGW's Default Include Path So, if MinGW doesn't search in these "normal" directories, where does it search? Before answering this, it may be useful to understand why MinGW doesn't search in these directories. Firstly, on a native MS-Windows host, these directories do not typically exist; the multiply rooted nature of the file system means that such path names would be ambiguous. Secondly, since MinGW itself is not a suite of MSYS applications, even if such directories are created in the MSYS environment, MinGW would have no means to locate them. Thus, to avoid imposing draconian restrictions on how users install MinGW, the maintainers have chosen to adopt a restricted search paradigm, which is
egcs-bugs at egcs dot cygnus dot com Subject: Where is stddef.h??? From: "Bill C. Riemers" Date: Mon, 07 Jun 1999 13:31:52 -0400 Organization: AT&T Labs Reply-To: bcr at sanskrit dot lz dot att dot com Hi. I just installed egcs version 2.91.66 with the following procedure: % bunzip2 -c egcs-1.1.2.tar.bz2|tar xvvf - % mkdir egcs-build % cd egcs-build % ../egcs-1.1.2/configure --prefix=/usr/local/OS % make bootstrap % make test % su -c "make install" Now whenever I try to compile or even make dependencies I get the following errors: In file included from /j9/bcr/Cybrary/Compressor/src/libungif-4.1.0/dgif_lib.c:20: /usr/include/sys/types.h:70: warning: No include path in which to find stddef.h In file included from /j9/bcr/Cybrary/Compressor/src/libungif-4.1.0/dgif_lib.c:25: /usr/include/stdlib.h:32: warning: No include path in which to find stddef.h In file included from /usr/include/stdlib.h:360, from /j9/bcr/Cybrary/Compressor/src/libungif-4.1.0/dgif_lib.c:25: /usr/include/alloca.h:25: warning: No include path in which to find stddef.h In file included from /usr/include/libio.h:31, from /usr/include/stdio.h:29, from /j9/bcr/Cybrary/Compressor/src/libungif-4.1.0/dgif_lib.c:28: /usr/include/_G_config.h:13: warning: No include path in which to find stddef.h In file included from /usr/include/stdio.h:29, from /j9/bcr/Cybrary/Compressor/src/libungif-4.1.0/dgif_lib.c:2 I've searched the egcs distribution and I can not find a file called stddef.h. I've search my Linux distribution, and the only file I can find call stddef.h is /usr/include/g++-2.7/std/stddef.h This seems way too obvious of a problem for it not to be listed in the FAQ or list of known problems, or even a mention in the egcs-bugs archive. But I can find no mention of where this file is suppose to come from and what it should contain, and why it is missing. Bill Follow-Ups: Re: Where is stddef.h??? From: Jeffrey A Law Index Nav: [DateIndex] [SubjectIndex] [AuthorIndex] [ThreadIndex] Message Nav: [DatePrev][DateNext] [ThreadPrev][ThreadNext]