Makefile的问题(新编程语言WIP)

问题描述 投票:0回答:1

我一直在尝试用C语言制作自己的编程语言Supercode,我想做一个基本的 你好,(名字)。 用它来编程。

现在,我有2个函数:say和take_str。

#include "Hello.spr"

string say(string a) {
  printf("Output: %s", a);
}

string take_str(string a) {
  a = get_string("InputString: ");
}

这是我的程序,叫 Hello.spr:

#include "supercode.pro"

int main(void) {
  string a = take_str("What's your name?\n");
  say("Hello, %s", a);
}

但我的问题是Makefile。这是我输入的内容。

make Hello.spr Hello:
  clang -fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow    Hello.spr  -lcrypt -lcs50 -lm -o Hello

不幸的是,总是有一个错误。就是这个。Makefile:2: *** missing seperator. Stop.

你能告诉我为什么以及如何解决这个问题吗?

c makefile
1个回答
0
投票

试试这个。

Hello: Hello.spr supercode.pro
  clang -fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow    Hello.spr  -lcrypt -lcs50 -lm -o Hello
© www.soinside.com 2019 - 2024. All rights reserved.