英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论