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

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.

  • 写回答

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?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
  • ¥15 不小心不正规的开发公司导致不给我们y码,
  • ¥15 我的代码无法在vc++中运行呀,错误很多
  • ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。
  • ¥60 fail to initialize keyboard hotkeys through kernel.0000000000
  • ¥30 ppOCRLabel导出识别结果失败
  • ¥15 Centos7 / PETGEM
  • ¥15 csmar数据进行spss描述性统计分析
  • ¥15 各位请问平行检验趋势图这样要怎么调整?说标准差差异太大了
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题