在Go语言中使用Windows的DLL库,编译为Linux和Mac OS X平台。

huangapple go评论87阅读模式
英文:

Use windows dll libraries in go, compiled for linux and mac os x

问题

我想知道在我的Go项目中,是否有机会在编译为Mac OSX和Linux时使用专有的Windows DLL文件?

英文:

I just wonder is there a chance to use proprietary windows dlls in my go project, compiling for mac osx and linux?

答案1

得分: 1

不,你不能在Linux/OSX上使用Windows的动态链接库(dll)。

然而,如果你真的非常需要这样做,你可以像TeamViewer一样,将你的软件与预编译的Wine一起发布,还有一些在Steam上的“几乎本地化”的游戏。

英文:

No, you can't use windows dlls on Linux / OSX.

However if you really really have to do that, you could always ship your software with a pre-compiled wine like TeamViewer does and few "almost-native" games on Steam.

答案2

得分: 0

我还没有太多使用Go!的经验,但是假设这些是你在C++中使用的相同类型,那么不能原生地做到这一点。你需要使用像Wine这样的工具(我不确定它是否在Mac OSX上构建)。

英文:

I have not used Go! to much, but assuming these are the same kinds you would use in c++, then no, you cannot do this natively. You would need to use something such as wine (I am not sure if that builds on mac osx though)

huangapple
  • 本文由 发表于 2014年7月16日 03:18:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/24766401.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定