0

我决定通过实际使用 Spotifi 的 API 来开始学习 C++。

所以我下载了适合windows环境的文件,并设置MinGW使用它来编译。

现在,一切就绪,我在 Sublime2 项目中加载 Spotify-examples 文件夹并运行构建,但问题是我似乎无法传递以下错误:

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"]
}

我错过了构建过程中的任何步骤吗?

4

1 回答 1

1

您正在尝试链接 Makefile,由于它不是目标文件,因此将失败。您需要将其从构建过程中排除。

于 2013-02-23T10:01:52.720 回答