英文:
Possible to port gui functions with swig
问题
我想知道是否有可能将gtk gui框架与swig包装器一起移植到Go语言?还是我只是活在幻想世界里?
英文:
I was wondering if it would be possible to port the gtk gui framework to Go with the swig wrapper? Or am I just living in a fantasy world?
答案1
得分: 3
从技术上讲,是的。目前看来,SWIG对Go的支持有限。
简单的SWIG包装器的真正问题是丑陋的细节会泄露出来。生成的接口需要在其上面提供一个层,以提供“Goish”行为,特别是在垃圾回收和接口方面。
英文:
Technically, yes. It looks like SWIG support for Go is limited right now.
The real problem with simple SWIG wrappers is the ugly details leak through. The produced interface would need a layer on top of it in order to provide "Goish" behavior, especially in regards to garbage collection and interfaces.
答案2
得分: 3
是的,这是可能的。SWIG甚至并不是必需的,但它确实使过程更加自动化。
这里已经有一个正在进行中的Go的GTK绑定:
http://github.com/mattn/go-gtk
英文:
Yes, it's possible. SWIG isn't even strictly necessary, but it does make the process more automatic.
There's already a GTK binding for Go in progress here:
http://github.com/mattn/go-gtk
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论