doujiejujixi27244
2019-08-23 16:53
浏览 84
已采纳

GUI未运行-在DLL中找不到入口点

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.

图片转代码服务由CSDN问答提供 功能建议

我正在尝试遵循以下简单的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 
   
 
 <  p>双击生成的exe文件时,出现一个包含以下消息的对话框: 
 
 
 在动态链接库COMCTL32中找不到过程入口点TaskDialog。  DLL 
   
 
 

我运行了 CCleaner 并进行了修复 大量的注册表问题,但上述问题仍然存在。

我正在Windows7上使用以下版本:

  go版本go1.12.9 Windows / 386 
 
gcc(i686-posix  -dwarf-rev0,由MinGW-W64项目构建)8.1.0 
   
 
 

问题出在哪里,如何解决? 感谢您的帮助。

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongqiulei1987 2019-08-25 13:39
    已采纳

    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?

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题