go-qml / qml

QML support for the Go language
Other
1.96k stars 189 forks source link

Error! #185

Open QuestionPython opened 6 years ago

QuestionPython commented 6 years ago

$ go version

go version go1.10 linux/amd64

$ go get gopkg.in/qml.v1

# gopkg.in/qml.v1
In file included from go/src/gopkg.in/qml.v1/cpp/private/qobject_p.h:2:0,
                 from /usr/include/qt/QtCore/5.10.0/QtCore/private/qmetaobject_p.h:58,
                 from go/src/gopkg.in/qml.v1/cpp/private/qmetaobject_p.h:2,
                 from cpp/govalue.h:7,
                 from cpp/capi.cpp:10,
                 from all.cpp:2:
/usr/include/qt/QtCore/5.10.0/QtCore/private/qobject_p.h:55:38: fatal error: QtCore/private/qglobal_p.h: No such file or directory
 #include <QtCore/private/qglobal_p.h>
                                      ^
compilation terminated.

how fix?

arsham commented 6 years ago

In my case (Arch linux) I fixed it by linking this way:

sudo ln -s /usr/include/qt/QtCore/5.10.1/QtCore /usr/include/

Thanks to @Bleser92 for the hint :+1: