Comment on Show HN: Qt binding for Go with support for all major operating systemsComments−pspeter39yDoes this require CGo?−TheDong9yYes. For example, the dbus package: https://github.com/therecipe/qt/blob/053d54a2eb0658bae6e3259...https://github.com/therecipe/qt/blob/053d54a2eb0658bae6e3259...All of the code is cgo wrappers around messes of c/c++−infogulch9yCan gc load a cgo plugin [1]? If so, could you build therecipe/qt into a plugin and load it at runtime to avoid being forced to use cgo?E.g. your project has `type Qt interface {`, and the plugin exports a global symbol that can be asserted to that interface to use the library.[1]: https://golang.org/pkg/plugin/−therecipeOP9yIt could probably work, but plugins currently only work on linux.
Comments
Does this require CGo?
Yes. For example, the dbus package: https://github.com/therecipe/qt/blob/053d54a2eb0658bae6e3259...
https://github.com/therecipe/qt/blob/053d54a2eb0658bae6e3259...
All of the code is cgo wrappers around messes of c/c++
Can gc load a cgo plugin [1]? If so, could you build therecipe/qt into a plugin and load it at runtime to avoid being forced to use cgo?
E.g. your project has `type Qt interface {`, and the plugin exports a global symbol that can be asserted to that interface to use the library.
[1]: https://golang.org/pkg/plugin/
It could probably work, but plugins currently only work on linux.