我有一个使用 libvirt-go v7.4.0 的项目。去.mod:github.com/libvirt/libvirt-go v7.4.0+incompatible // indirect它可以在 mac 和 linux 上编译,但是在带有标志的 macos 上交叉编译失败。GOOS=Linux$ env GOOS=linux go build -o myapp .# gitlab.mycompany.io/mycompany-platform/myapp/command/agentcommand/agent/libvirt_listener.go:11:26: undefined: libvirt.DomainEventTypecommand/agent/libvirt_listener.go:23:14: undefined: libvirt.Connectcommand/agent/libvirt_listener.go:100:9: undefined: libvirt.EventRegisterDefaultImplcommand/agent/libvirt_listener.go:105:15: undefined: libvirt.NewConnectcommand/agent/libvirt_listener.go:115:4: undefined: libvirt.EventRunDefaultImplcommand/agent/libvirt_listener.go:121:22: undefined: libvirt.Connectcommand/agent/libvirt_listener.go:121:42: undefined: libvirt.Domaincommand/agent/libvirt_listener.go:121:65: undefined: libvirt.DomainEventLifecyclecommand/agent/libvirt_listener.go:149:63: undefined: libvirt.DomainStatecommand/agent/libvirt_listener.go:121:22: too many errors
- 1 回答
- 0 关注
- 202 浏览
添加回答
举报
0/150
提交
取消