所以它根本不清楚如何在SPM模块映射的链接行中指定3rdparty.framework。有人有一个有效的例子吗?还有三个欢呼声非常好的工具!
module DudeNative [system] {
header "/Library/Frameworks/DudeNative.framework/Versions/A/Headers/DudeNative.h"
link "DudeNative"
export *
}
答案 0 :(得分:0)
如果在该程序中的任何翻译单元中导入封闭模块,则链接声明指定程序应链接到的库或框架。在您的情况下,您指示链接器与-lDudeNative
链接(对于Unix风格的链接器)。
来自man ld
-lx This option tells the linker to search for libx.dylib or
libx.a in the library search path. If string x is of the
form y.o, then that file is searched for in the same places,
but without prepending `lib' or appending `.a' or `.dylib' to
the filename.