我有一个批处理文件来编译和链接我的所有代码。它包含以下内容:
@echo off
nasm -f aout -o start.o start.asm
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o scrn.o scrn.c
ld -T link.ld -o kernel.bin start.o main.o scrn.o
pause
问题是,当我运行它时,它只是将所有内容都作为文本打印出来。 它肯定是一个批处理文件。它具有.bat文件扩展名,并且在notepad++中,@echo off和pause的语法被突出显示,而没有手动设置。 这是Windows 7的错误吗?还是我做错了什么?