GUI未运行-在DLL中找不到入口点 [英] GUI not running - not finding entry point in DLL
问题描述
我正在尝试使用简单的GUI代码:
package main
import( github.com/andlabs/ ui; os)
func main(){
ui.Main(makeMainWin)
}
func makeMainWin(){
var mainWindow = ui.NewWindow ( MyTitle,500、250,否)
var mainbox = ui.NewVerticalBox()
mainbox.Append(ui.NewLabel( A Label),false)
var exitButton = ui.NewButton( Exit)
exitButton.OnClicked(func(* ui.Button){os.Exit(0)})
mainbox.Append(exitButton,false)
mainWindow。 SetChild(mainbox)
mainWindow.OnClosing(func(* ui.Window)bool {ui.Quit(); return true})
mainWindow.Show()
}
代码编译并生成时没有任何错误或警告。但是,当我尝试从命令行运行它时,出现以下错误:
退出状态-1073741511
双击生成的exe文件,出现一个对话框,显示以下消息:
在动态链接库COMCTL32.DLL
$中找不到过程入口点TaskDialog
p $ p>
我运行了 CCleaner ,并修复了注册表问题,但上述问题仍然存在。
我正在Windows7上使用以下版本:
go版本go1.12.9 Windows / 386
gcc(i686-posix-dwarf-rev0,由MinGW-W64项目构建)8.1.0
问题出在哪里,如何解决?谢谢您的帮助。
解决方案您需要一个清单文件,用于指示Windows加载常用控件。您是否已按照 https://github.com/andlabs/ui/上的说明进行操作blob / master / README.md ,特别是有关winres导入的信息?
I am trying following simple GUI code:
package main import ("github.com/andlabs/ui"; "os") func main() { ui.Main(makeMainWin) } func makeMainWin(){ var mainWindow = ui.NewWindow("MyTitle", 500, 250, false) var mainbox = ui.NewVerticalBox() mainbox.Append(ui.NewLabel("A Label"), false) var exitButton = ui.NewButton("Exit") exitButton.OnClicked( func(*ui.Button){os.Exit(0)} ) mainbox.Append(exitButton, false) mainWindow.SetChild(mainbox) mainWindow.OnClosing( func (*ui.Window) bool { ui.Quit(); return true } ) mainWindow.Show() }
The code compiles and builds without any error or warning. However, when I try to run it from command line, I get following error:
exit status -1073741511
On double clicking the built exe file, I get a dialog box with following message:
The procedure entry point TaskDialog could not be located in the dynamic link library COMCTL32.DLL
I ran CCleaner and fixed large number of registry issues but above problem persists.
I am working with following versions on Windows7:
go version go1.12.9 windows/386 gcc (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0
Where is the problem and how can it be solved? Thanks for your help.
解决方案You need a manifest that instructs windows to load common controls. Have you followed the instructions at https://github.com/andlabs/ui/blob/master/README.md, specifically about the winres import?
这篇关于GUI未运行-在DLL中找不到入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!