我正在使用this generic makefile。Makefile錯誤:缺少分隔符,使用SDL和OpenGL編譯
與此自定義的選項:而不是
# The pre-processor options used by the cpp (man cpp for more).
CPPFLAGS = -Wall -I/Library/Frameworks/SDL.framework/Headers
# The options used in linking as well as in any direct use of ld.
LDFLAGS = -framework SDL -framework Cocoa -framework OpenGL
# The executable file name.
# If not specified, current directory name or `a.out' will be used.
PROGRAM = app
# The source file types (headers excluded).
# .c indicates C source files, and others C++ ones.
SRCEXTS = .c .C .cc .cpp .CPP .c++ .cxx .cp .m
clean:
$(RM) $(OBJS) $(PROGRAM) $(PROGRAM)
:
# The pre-processor options used by the cpp (man cpp for more).
CPPFLAGS = -Wall
# The options used in linking as well as in any direct use of ld.
LDFLAGS =
# The executable file name.
# If not specified, current directory name or `a.out' will be used.
PROGRAM =
# The source file types (headers excluded).
# .c indicates C source files, and others C++ ones.
SRCEXTS = .c .C .cc .cpp .CPP .c++ .cxx .cp
clean:
$(RM) $(OBJS) $(PROGRAM) $(PROGRAM).exe
Here你可以找到我運行生成文件的完整版本。
我使用Mac OS X 10.6.8和gcc 4.2.1,並嘗試使用SDL和OpenGL編譯main.cpp
與SDLMain.m
和SDLMain.h
。
彈出的錯誤是:
main.d:1: * missing separator. Stop.
和文件main.d(由生成的makefile)是這樣的:
-n ./
main.o: main.cpp
什麼問題?
你在這裏表現出整個文件?因爲我沒有看到一個'include'行,但它正在抱怨單獨文件('main.d')的內容。 * //讀取錯誤信息:這就是你所做的。* – dmckee
@dmckee [This](http://pastebin.com/fqXxDesJ)是該文件的完整粘貼。 (注意我的問題的第一行)。 – Shoe
*「(另請注意,我的問題的第一行)」*我不讀代碼的網站:你的問題應該站在它自己的。特別是,如果要點擊幾次甚至可以看到它,我尤其不會閱讀代碼。你對現有的依賴文件('.d's)有問題。清除它們,看看它是否再次出現。 – dmckee