使用 GNU make 和 Microsoft Visual Studio 编译器编译 .obj 文件中的所有 .c 文件
谁能告诉我这段代码有什么问题:
CC = "C:\Program Files\Microsoft Visual Studio\VC98\Bin\CL.EXE"
CFLAGS = /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(OBJ_PATH)\$(EXECUTABLE).pch" /YX /Fo"$(OBJ_PATH)\\" /Fd"$(OBJ_PATH)\\" /FD /GZ /c
$(OBJ_PATH)\%.obj : $(SOURCE_PATH)\%.c
$(CC) $(CFLAGS) $<
它似乎没有识别出这条规则将 .obj 连接到 .c
can anyone tell me what is wrong with this code:
CC = "C:\Program Files\Microsoft Visual Studio\VC98\Bin\CL.EXE"
CFLAGS = /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(OBJ_PATH)\$(EXECUTABLE).pch" /YX /Fo"$(OBJ_PATH)\\" /Fd"$(OBJ_PATH)\\" /FD /GZ /c
$(OBJ_PATH)\%.obj : $(SOURCE_PATH)\%.c
$(CC) $(CFLAGS) lt;
it does not seem to recognize this rule as connecting the .obj to the .c
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
反斜杠被 GNU make 解释为转义并禁用 % 的特殊含义。尝试将反斜杠加倍或用正斜杠替换它们。
The backslashes are interpreted as escapes by GNU make and disable the special meaning of %. Try doubling the backslashes or replacing them by forward slashes.