我决定通过实际使用Spotifi的API来开始学习C.
所以我下载了适用于Windows环境的文件,并设置MinGW用它来编译 .
现在,所有设置,我在Sublime2项目中加载Spotify-examples文件夹并运行Build,但问题是我似乎无法传递以下错误:
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:D:\W0RK\Software\spotify-examples\Makefile: file format not recognized; treating as linker script
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:D:\W0RK\Software\spotify-examples\Makefile:1: syntax error
collect2.exe: error: ld returned 1 exit status
[Finished in 0.4s with exit code 1]
这是我的自定义sublime构建配置:
{
"cmd": ["C:\\MinGW\\bin\\mingw32-g++.exe", "-Wall", "-time", "--verbose", "$file", "-o", "$file_base_name"]
}
我错过了建设过程中的任何一步吗?
1 回答
您正在尝试链接Makefile,由于它不是目标文件,因此会失败 . 您需要将其从构建过程中排除 .