我正在使用名爲colors.h
的標題來組織我的源代碼。標題是這樣的:gcc找不到包含的標題
#define DEFAULT 0x07
#define BLACK 0
#define GRAY 7
#define BLUE 9
#define GREEN 10
#define CYAN 11
#define RED 12
#define MAGENTA 13
#define YELLOW 14
我把標題在主源代碼的同一目錄下,名爲kernel.c
,以及包括像這樣:
#include <colors.h>
但是,當我嘗試編譯,我得到這個:
[email protected]:~/Development/Test$ gcc -o kernel.o -c kernel.c -Wall -Wextra -nostdlib -nostartfiles -nodefaultlibs
kernel.c:1:20: error: colors.h: No such file or directory
[email protected]:~/Development/Test$
我能做些什麼來解決這個問題?
其他很多其他的http://stackoverflow.com/questions/973146/how-to-include-header-files-in-gcc-search-path。 – 2010-01-26 14:22:13
顏色拼寫錯誤。 – 2010-01-26 14:23:22
lol @ colors拼錯了 – JonH 2010-01-26 14:50:06