gcc -- header file not found! >:(
gcc -- header file not found! >:(
I'm trying to #include "defines.h" but gcc just complains all the time that the file is not found. =/
I've included other headers in the same file, but "defines.h" just won't work.
This is how I compile with gcc:
gcc -nostartfiles -nostdlib -fno-builtin -fwritable-strings -c source/*.c
I've included other headers in the same file, but "defines.h" just won't work.
This is how I compile with gcc:
gcc -nostartfiles -nostdlib -fno-builtin -fwritable-strings -c source/*.c
Re:gcc -- header file not found! >:(
Pass the -I<path> switch to gcc to tell it where to find header files in non-standard locations.
Re:gcc -- header file not found! >:(
..
Last edited by Perica on Sun Dec 03, 2006 9:21 pm, edited 1 time in total.
Re:gcc -- header file not found! >:(
May be your file name is something like a 'define.H' or 'Define.H', gcc is case sensitive
Re:gcc -- header file not found! >:(
The filename is correct and the header file is in the same directory as the other files... weird =/
Re:gcc -- header file not found! >:(
Shot in the dark .
Did you create the defines.h file on a different OS. Eg Used a text editor on Windows and are compiling on Linux.
Did you create the defines.h file on a different OS. Eg Used a text editor on Windows and are compiling on Linux.
Re:gcc -- header file not found! >:(
Heh, nope.
I had the same problem with a file named "k_descriptor.h", I removed the underscore and then it worked... but my defines.h doesn't have an underscore to remove =/
I had the same problem with a file named "k_descriptor.h", I removed the underscore and then it worked... but my defines.h doesn't have an underscore to remove =/
Re:gcc -- header file not found! >:(
I fixed it! wohooo
I renamed "k_descriptor.h" to "desc.h" and it worked.
GCC is kinda weird I think.
I renamed "k_descriptor.h" to "desc.h" and it worked.
GCC is kinda weird I think.
Re:gcc -- header file not found! >:(
Fun problem ;D.
Could it be a problem with length of filenames?
k_descriptor.h : Doesn't fit in 8.3 format
defines.h : Does
Could it be a problem with length of filenames?
k_descriptor.h : Doesn't fit in 8.3 format
defines.h : Does
Re:gcc -- header file not found! >:(
gcc -nostartfiles -nostdlib -fno-builtin -fwritable-strings -I source -c source/*.c
Re:gcc -- header file not found! >:(
Are you using DJGPP? It could be having problems with long file names. I'd recommend switching to Cygwin or Mingw.
Re:gcc -- header file not found! >:(
If you're using Windows, I'd still recommend Cygwin or Mingw. DJGPP is DOS, so Windows has to emulate DOS in order to run it, giving large overheads (and slowing it down). Cygwin and Mingw are native Win32 programs, so they support long file names automatically, and are much faster.
Re:gcc -- header file not found! >:(
...and giving you lots of other nifty tools in the process. (astyle, grep, gpg, ssh, irc, ...)
Every good solution is obvious once you've found it.