c - 我在 Visual Studio Code 中不断收到“解析错误”和“找不到”错误
问题描述
我正在尝试从教程中学习一点 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>
解决方案
推荐阅读
- xaml - 如何将 InputTransparent 设置为父级,而不是子级
- kubernetes - 无法在 Openshift 上运行 Pumba
- javascript - 如何从不在 npm(节点模块)中的外部 js 获取响应
- cmake - Pytorch Build from Source 给出错误 make: *** No rule to make target 'install'。停止
- wordpress - WooCommerce 自定义付款方式
- php - CakePHP 3.7 cakephp/认证插件。错误“需要身份验证才能继续”
- amazon-web-services - 从另一个 Lambda 函数调用具有代理集成的 Lambda 函数,而无需通过 Api 网关
- azure - 无法从同一虚拟网络中的一个 azure VM 通信到另一个 azure VM 的辅助 NIC
- ios - React-Native componentWillUnmount 未在 iOS 上调用
- angular - matdialog打开方法的Angular 7单元测试用例