c++ - C++ 和 Spotify API 入门

标签 c++ compiler-construction sublimetext2 spotify

我决定通过实际使用 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"]
}

我是否遗漏了构建过程中的任何步骤?

最佳答案

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

关于c++ - C++ 和 Spotify API 入门,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15035256/

相关文章:

python - 在 Sublime Text 2 中显示当前函数的 Python 文档字符串?

python - 使用 NRF24L01 将 Arduino 浮点值转换为 Python

c++ - GCC 编译器错误 : "redefinition...previously defined"

c++ - 找出两张图片之间的差异

JavaScript 对象代码缓存 : which of these assertions are wrong?

c++ - 哪些标志将改善 gcc/clang 编译时间?

textmate - Ruby 1.9 哈希语法的 bundle ,或者修改现有匹配的方法?

plugins - Sublime Text SFTP 插件中文件夹和子文件夹的忽略正则表达式

c++ - 在 C++ 中设置模拟接口(interface)

c++ - 尾随数组习语