我在Visual Studio Code中不断收到“解析错误”和“找不到”错误

时间:2019-05-29 00:16:47

标签: c gameboy

我试图从教程中学习一些C语言来为Game Boy编程游戏,但我不断遇到两个错误:“解析错误”和“找不到”错误。谁能告诉我发生了什么事以及如何解决?

我只是尝试运行自己拥有的东西,因为我对C非常陌生,并不了解很多。

我的主文件:

#include <gb\gb.h>
#include <stdio.h>

void main(){
    printf("HELLO WORLD");
}

我正在尝试使用此.bat文件将其添加到.gb:

c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -c -o main.o main.c
c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -o main.gb main.o

这是上面代码的结果:

PS C:\Users\cdbil\Documents\gameboycode\helloworld> .\make.bat

C:\Users\cdbil\Documents\gameboycode\helloworld>c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -c -o main.o main.c

main.c(1) parse error: token -> '' ; column 0

C:\Users\cdbil\Documents\gameboycode\helloworld>c:\gbdk\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -o main.gb main.o
c:\gbdk\bin\lcc: can't find `main.o'
PS C:\Users\cdbil\Documents\gameboycode\helloworld>

0 个答案:

没有答案