在Cgo包中导入C.scintilla_new()

时间:2017-08-10 06:42:47

标签: go cgo scintilla

package main

//#cgo CFLAGS: -I/home/me/geany/scintilla/include
//#include <ScintillaWidget.h>
import "C"

import (
    "github.com/mattn/go-gtk/gtk"
)

func main() {
    gtk.Init(nil)
    window := gtk.NewWindow(gtk.WINDOW_TOPLEVEL)
    window.SetPosition(gtk.WIN_POS_CENTER)
    window.SetTitle("GTK Go!")
    window.SetIconName("textview")
    window.Connect("destroy", gtk.MainQuit)
    window.SetSizeRequest(600, 600)
    C.scintilla_new();
    window.ShowAll()
    gtk.Main()
}

这是我得到的错误:

# _/home/me/gosci/gosci
could not determine kind of name for C.scintilla_new

该定义显然位于第58行的标题中:

GtkWidget*  scintilla_new       (void);

如何编译?

0 个答案:

没有答案