我正在尝试使用此页面中的库从portaudio构建示例代码 . https://github.com/adfernandes/precompiled-portaudio-windows
我的sublime-build文件如下:
{
"cmd" : ["gcc", "$file_name", "-L/Desktop/portaudio-r1891-build/lib/x64/ReleaseMinDependency", "-llibportaudio_x64", "-o", "${file_base_name}.exe", "&&", "${file_base_name}.exe"],
"selector" : "source.c",
"shell" : true,
"working_dir" : "$file_path"
}
我收到错误“c:/ mingw / bin /../ lib / gcc / mingw32 / 4.9.3 /../../../../ mingw32 / bin / ld.exe:找不到-llibportaudio_x64
我是新手制作文件所以不确定是什么不对 . 如果没有添加portaudio,make文件会正确构建Hello World测试代码 . portaudio的东西不在标准路径中 . 我在portaudio示例代码中有“#include”portaudio.h“,并且在与示例代码相同的文件夹中有.h文件 . 我在桌面上有库的文件夹,并且我试图将它的路径链接到该文件夹-L命令 . 我见过有人讨论过.a文件,但我似乎没有从库中下载过 .
1 回答
您正在将您的32位程序与64位版本的DLL链接 .
将链接路径(
-L
)更改为32位DLL的位置或使用64位编译器 .起初我怀疑它是缺少的
lib
前缀,但是MinGW文档说在Windows上可以省略lib
.