Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build demo.go error #414

Open
hailiangchen opened this issue May 22, 2020 · 8 comments
Open

build demo.go error #414

hailiangchen opened this issue May 22, 2020 · 8 comments

Comments

@hailiangchen
Copy link


D:\go\src\github.com\mattn\go-gtk\_example\demo>go build demo.go
# github.com/mattn/go-gtk/glib
In file included from glib.go:5,
                 from _cgo_export.c:4:
..\..\glib/glib.go.h:183:1: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
  183 | static void _g_thread_init(GThreadFunctions *vtable) {
      | ^~~~~~
In file included from C:/msys64/mingw64/include/glib-2.0/glib.h:111,
                 from ..\..\glib/glib.go.h:4,
                 from glib.go:5,
                 from _cgo_export.c:4:
C:/msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:56:8: note: declared here
   56 | struct _GThreadFunctions
      |        ^~~~~~~~~~~~~~~~~
# github.com/mattn/go-gtk/glib
In file included from ..\..\glib\glib.go:5:
..\..\glib/glib.go.h:183:1: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
  183 | static void _g_thread_init(GThreadFunctions *vtable) {
      | ^~~~~~
In file included from C:/msys64/mingw64/include/glib-2.0/glib.h:111,
                 from ..\..\glib/glib.go.h:4,
                 from ..\..\glib\glib.go:5:
C:/msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:56:8: note: declared here
   56 | struct _GThreadFunctions
      |        ^~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function '_cgo_d563e2f75b38_Cfunc__g_thread_init':
cgo-gcc-prolog:192:3: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
In file included from C:/msys64/mingw64/include/glib-2.0/glib.h:111,
                 from ..\..\glib/glib.go.h:4,
                 from ..\..\glib\glib.go:5:
C:/msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:56:8: note: declared here
   56 | struct _GThreadFunctions
      |        ^~~~~~~~~~~~~~~~~
go build github.com/mattn/go-gtk/gdk: invalid flag in pkg-config --libs: -Wl,-luuid


@hailiangchen hailiangchen changed the title build demo.go error , build demo.go error May 22, 2020
@cnchef
Copy link

cnchef commented Nov 10, 2020

build demo err
execution environment:
os: Windows 10
go: go version go1.14.2 windows/amd64
gtk: mingw-w64-x86_64-gtk2-2.24.32-6 mingw-w64-x86_64-gtk3-3.24.23-3

E:\go\src\github.com\mattn\go-gtk_example\demo>go build demo.go

github.com/mattn/go-gtk/glib

In file included from glib.go:5,
from _cgo_export.c:4:
E:\go\src\github.com\mattn\go-gtk\glib/glib.go.h:183:1: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
static void _g_thread_init(GThreadFunctions *vtable) {
^~~~~~
In file included from C:/msys64/mingw64/include/glib-2.0/glib.h:111,
from E:\go\src\github.com\mattn\go-gtk\glib/glib.go.h:4,
from glib.go:5,
from _cgo_export.c:4:
C:/msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:56:8: note: declared here
struct _GThreadFunctions
^~~~~~~~~~~~~~~~~

github.com/mattn/go-gtk/glib

In file included from E:\go\src\github.com\mattn\go-gtk\glib\glib.go:5:
E:\go\src\github.com\mattn\go-gtk\glib/glib.go.h:183:1: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
static void _g_thread_init(GThreadFunctions *vtable) {
^~~~~~
In file included from C:/msys64/mingw64/include/glib-2.0/glib.h:111,
from E:\go\src\github.com\mattn\go-gtk\glib/glib.go.h:4,
from E:\go\src\github.com\mattn\go-gtk\glib\glib.go:5:
C:/msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:56:8: note: declared here
struct _GThreadFunctions
^~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function '_cgo_d563e2f75b38_Cfunc__g_thread_init':
cgo-gcc-prolog:192:3: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
In file included from C:/msys64/mingw64/include/glib-2.0/glib.h:111,
from E:\go\src\github.com\mattn\go-gtk\glib/glib.go.h:4,
from E:\go\src\github.com\mattn\go-gtk\glib\glib.go:5:
C:/msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:56:8: note: declared here
struct _GThreadFunctions
^~~~~~~~~~~~~~~~~

github.com/mattn/go-gtk/gtk

In file included from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkobject.h:37,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkwidget.h:36,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkcontainer.h:35,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkbin.h:35,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkwindow.h:36,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkdialog.h:35,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtk.h:33,
from ....\gtk/gtk.go.h:4,
from gtk.go:8,
from _cgo_export.c:4:
C:/msys64/mingw64/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: 'GTypeDebugFlags' is deprecated [-Wdeprecated-declarations]
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^~~~
In file included from C:/msys64/mingw64/include/glib-2.0/gobject/gobject.h:24,
from C:/msys64/mingw64/include/glib-2.0/gobject/gbinding.h:29,
from C:/msys64/mingw64/include/glib-2.0/glib-object.h:22,
from C:/msys64/mingw64/include/glib-2.0/gio/gioenums.h:28,
from C:/msys64/mingw64/include/glib-2.0/gio/giotypes.h:28,
from C:/msys64/mingw64/include/glib-2.0/gio/gio.h:26,
from C:/msys64/mingw64/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from C:/msys64/mingw64/include/gtk-2.0/gdk/gdk.h:32,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtk.h:32,
from ....\gtk/gtk.go.h:4,
from gtk.go:8,
from _cgo_export.c:4:
C:/msys64/mingw64/include/glib-2.0/gobject/gtype.h:679:1: note: declared here
679 | {
| ^
In file included from C:/msys64/mingw64/include/gtk-2.0/gtk/gtktoolitem.h:31,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtktoolbutton.h:30,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtk.h:126,
from ....\gtk/gtk.go.h:4,
from gtk.go:8,
from _cgo_export.c:4:
C:/msys64/mingw64/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
73 | GTimeVal last_popdown;
| ^~~~~~~~
In file included from C:/msys64/mingw64/include/glib-2.0/glib/galloca.h:32,
from C:/msys64/mingw64/include/glib-2.0/glib.h:30,
from C:/msys64/mingw64/include/glib-2.0/gobject/gbinding.h:28,
from C:/msys64/mingw64/include/glib-2.0/glib-object.h:22,
from C:/msys64/mingw64/include/glib-2.0/gio/gioenums.h:28,
from C:/msys64/mingw64/include/glib-2.0/gio/giotypes.h:28,
from C:/msys64/mingw64/include/glib-2.0/gio/gio.h:26,
from C:/msys64/mingw64/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from C:/msys64/mingw64/include/gtk-2.0/gdk/gdk.h:32,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtk.h:32,
from ....\gtk/gtk.go.h:4,
from gtk.go:8,
from _cgo_export.c:4:
C:/msys64/mingw64/include/glib-2.0/glib/gtypes.h:547:8: note: declared here
547 | struct _GTimeVal
| ^~~~~~~~~

github.com/mattn/go-gtk/gtk

In file included from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkobject.h:37,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkwidget.h:36,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkcontainer.h:35,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkbin.h:35,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkwindow.h:36,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkdialog.h:35,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtk.h:33,
from ....\gtk/gtk.go.h:4,
from ....\gtk\gtk.go:8:
C:/msys64/mingw64/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: 'GTypeDebugFlags' is deprecated [-Wdeprecated-declarations]
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^~~~
In file included from C:/msys64/mingw64/include/glib-2.0/gobject/gobject.h:24,
from C:/msys64/mingw64/include/glib-2.0/gobject/gbinding.h:29,
from C:/msys64/mingw64/include/glib-2.0/glib-object.h:22,
from C:/msys64/mingw64/include/glib-2.0/gio/gioenums.h:28,
from C:/msys64/mingw64/include/glib-2.0/gio/giotypes.h:28,
from C:/msys64/mingw64/include/glib-2.0/gio/gio.h:26,
from C:/msys64/mingw64/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from C:/msys64/mingw64/include/gtk-2.0/gdk/gdk.h:32,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtk.h:32,
from ....\gtk/gtk.go.h:4,
from ....\gtk\gtk.go:8:
C:/msys64/mingw64/include/glib-2.0/gobject/gtype.h:679:1: note: declared here
679 | {
| ^
In file included from C:/msys64/mingw64/include/gtk-2.0/gtk/gtktoolitem.h:31,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtktoolbutton.h:30,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtk.h:126,
from ....\gtk/gtk.go.h:4,
from ....\gtk\gtk.go:8:
C:/msys64/mingw64/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
73 | GTimeVal last_popdown;
| ^~~~~~~~
In file included from C:/msys64/mingw64/include/glib-2.0/glib/galloca.h:32,
from C:/msys64/mingw64/include/glib-2.0/glib.h:30,
from C:/msys64/mingw64/include/glib-2.0/gobject/gbinding.h:28,
from C:/msys64/mingw64/include/glib-2.0/glib-object.h:22,
from C:/msys64/mingw64/include/glib-2.0/gio/gioenums.h:28,
from C:/msys64/mingw64/include/glib-2.0/gio/giotypes.h:28,
from C:/msys64/mingw64/include/glib-2.0/gio/gio.h:26,
from C:/msys64/mingw64/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from C:/msys64/mingw64/include/gtk-2.0/gdk/gdk.h:32,
from C:/msys64/mingw64/include/gtk-2.0/gtk/gtk.h:32,
from ....\gtk/gtk.go.h:4,
from ....\gtk\gtk.go:8:
C:/msys64/mingw64/include/glib-2.0/glib/gtypes.h:547:8: note: declared here
547 | struct _GTimeVal
| ^~~~~~~~~

github.com/mattn/go-gtk/gtk

....\gtk\gtk.go:4271:3: cannot type switch on non-interface value val (type string)

@cnchef
Copy link

cnchef commented Nov 10, 2020

Why is there not to anyone answer?

@lzxzlx2016
Copy link

Why is there not to anyone answer?

因为没人会哈哈哈哈哈哈

@huangjie0515
Copy link

我也遇到了这个问题 ,会不会是win10电脑的问题

@yan3485797
Copy link

any one ?

@ghost
Copy link

ghost commented Apr 28, 2022

is there any solution?

@Emberwy
Copy link

Emberwy commented Sep 14, 2022

解决了吗,卡了一天了实在是解决不了

@focusfeel
Copy link

github.com/mattn/go-gtk/glib

In file included from glib.go:5,
from _cgo_export.c:4:
..........\go\src\github.com\mattn\go-gtk\glib/glib.go.h:183:1: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
183 | static void _g_thread_init(GThreadFunctions *vtable) {
| ^~~~~~
In file included from D:/Msys64/mingw64/include/glib-2.0/glib.h:114,
from ..........\go\src\github.com\mattn\go-gtk\glib/glib.go.h:4:
D:/Msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:58:8: note: declared here
58 | struct _GThreadFunctions
| ^~~~~~~~~~~~~~~~~

github.com/mattn/go-gtk/glib

In file included from ..........\go\src\github.com\mattn\go-gtk\glib\glib.go:5:
..........\go\src\github.com\mattn\go-gtk\glib/glib.go.h:183:1: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
183 | static void _g_thread_init(GThreadFunctions *vtable) {
| ^~~~~~
In file included from D:/Msys64/mingw64/include/glib-2.0/glib.h:114,
from ..........\go\src\github.com\mattn\go-gtk\glib/glib.go.h:4:
D:/Msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:58:8: note: declared here
58 | struct _GThreadFunctions
| ^~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function '_cgo_1efdb3e50950_Cfunc__g_thread_init':
cgo-gcc-prolog:192:3: warning: 'GThreadFunctions' is deprecated [-Wdeprecated-declarations]
D:/Msys64/mingw64/include/glib-2.0/glib/deprecated/gthread.h:58:8: note: declared here

Above are some warnings that cannot be worried about. The result is normal after modifing the demo.go file. Following are the modified statements.

Line 99:
label.ModifyFontEasy("DejaVu Serif 15") ---> label.ModifyFontEasy("Consolas 15")

Line 266:
tag := buffer.CreateTag("bold", map[string]string{
"background": "#FF0000", "weight": "700"})
--->
testTag := make(map[string]interface{})
tag := buffer.CreateTag("bold", testTag)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants