我正在使用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