构建使用zserge / webview

时间:2019-02-13 22:24:47

标签: windows go gcc visual-studio-code

在尝试调试使用zserge / webview的go代码时,出现一堆以CLSID和IID开头的错误。这些错误似乎没有出现在github上任何关于此软件包的问题中。

我尝试使用webview项目的所有三个可用分支(master,webview-x和webview-cxx)进行编译。我正在尝试在Windows 7上使用vs代码进行调试

package main

import (
"github.com/zserge/webview"
)

func main() {
// Open wikipedia in a 800x600 resizable window
webview.Open("Minimal webview example",
    "https://en.m.wikipedia.org/wiki/Main_Page", 800, 600, true)
}

我希望当我单击该绿色箭头时,程序会生成并启动。我确实尝试直接为webview-x分支运行go build(此时似乎是推荐的分支),并收到与下面相同的内容。

这是我在Win 7上尝试从vs代码进行调试时基于每个分支得到的结果:

master&webview-cxx

github.com/zserge/webview(.text): atexit: not defined
github.com/zserge/webview(.rdata$.refptr.CLSID_FileOpenDialog): CLSID_FileOpenDialog: not defined
github.com/zserge/webview(.rdata$.refptr.CLSID_FileSaveDialog): CLSID_FileSaveDialog: not defined
github.com/zserge/webview(.rdata$.refptr.CLSID_WebBrowser): CLSID_WebBrowser: not defined
github.com/zserge/webview(.rdata$.refptr.GUID_NULL): GUID_NULL: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IClassFactory): IID_IClassFactory: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IDispatch): IID_IDispatch: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IDocHostUIHandler): IID_IDocHostUIHandler: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IFileOpenDialog): IID_IFileOpenDialog: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IFileSaveDialog): IID_IFileSaveDialog: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IHTMLDocument2): IID_IHTMLDocument2: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IOleClientSite): IID_IOleClientSite: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IOleInPlaceActiveObject): IID_IOleInPlaceActiveObject: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IOleInPlaceObject): IID_IOleInPlaceObject: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IOleInPlaceSite): IID_IOleInPlaceSite: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IOleObject): IID_IOleObject: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IUnknown): IID_IUnknown: not defined
github.com/zserge/webview(.rdata$.refptr.IID_IWebBrowser2): IID_IWebBrowser2: not defined
github.com/zserge/webview(.text): undefined: atexit
github.com/zserge/webview(.rdata$.refptr.CLSID_FileOpenDialog): undefined: CLSID_FileOpenDialog
github.com/zserge/webview(.rdata$.refptr.CLSID_FileSaveDialog): undefined: CLSID_FileSaveDialog

webview-x

# github.com/zserge/webview
In file included from ..\github.com\zserge\webview\webview.cc:1:
..\github.com\zserge\webview\webview.h: In member function 'void webview::webview::bind(const char*, webview::webview::binding_t)':
..\github.com\zserge\webview\webview.h:1167: error: 'init' was not declared in this scope
     init(js.c_str());

..\github.com\zserge\webview\webview.h:1167: note: suggested alternative: 'int'
 ..\github.com\zserge\webview\webview.h: In function 'void webview_init(webview_t, const char*)':
..\github.com\zserge\webview\webview.h:1239: error: 'class webview::webview' has no member named 'init'
   static_cast<webview::webview *>(w)->init(js);

exit status 2
Process exiting with code: 1

那么这个库是否在某个时候坏了,或者我的系统缺少某些东西,或者我的设置有误吗?

0 个答案:

没有答案