构建使用Fyne GUI的goLang程序时出现错误。

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

Error during building goLang program using Fyne GUI

问题

“package command-line-arguments is not a main package”这个错误是在我尝试使用fyne gui构建我的Go项目时显示的。

英文:

"package command-line-arguments is not a main package"

This error showing when trying to build my go project using fyne gui

答案1

得分: 3

“main”包告诉Go编译器该包应该编译为可执行程序,而不是共享库。包“main”中的main函数将成为我们可执行程序的入口点。当构建共享库时,您将不会有任何主包和主函数在包中。

请使用package main替代您创建的包。

英文:

The package “main” tells the Go compiler that the package should compile as an executable program instead of a shared library. The main function in the package “main” will be the entry point of our executable program. When you build shared libraries, you will not have any main package and main function in the package.

Use package main in place of the package you have created

huangapple
  • 本文由 发表于 2021年10月6日 13:48:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/69460425.html
匿名

发表评论

匿名网友

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

确定