go-qml / qml

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

Error Build a sample #180

Open QuestionPython opened 7 years ago

QuestionPython commented 7 years ago

Hello, i can not build all sample. i also have qt creator in system(ubuntu 16.10-64bit)

guest@system:~/go/src/gopkg.in/qml.v1/examples/controls/basiclayouts$ go build basiclayouts.go
guest@system:~/go/src/gopkg.in/qml.v1/examples/controls/basiclayouts$ ./basiclayouts
error: file:////home/guest/go/src/gopkg.in/qml.v1/examples/controls/basiclayouts/main.qml.:46 module "QtQuick.Controls" is not installed
file:////home/guest/go/src/gopkg.in/qml.v1/examples/controls/basiclayouts/main.qml.:47 module "QtQuick.Layouts" is not installed
file:////home/guest/go/src/gopkg.in/qml.v1/examples/controls/basiclayouts/main.qml.:46 module "QtQuick.Controls" is not installed
file:////home/guest/go/src/gopkg.in/qml.v1/examples/controls/basiclayouts/main.qml.:47 module "QtQuick.Layouts" is not installed
guest@system:~/go/src/gopkg.in/qml.v1/examples/controls/basiclayouts$ 

how fix?

CheckGitCode commented 7 years ago

I also have this problem! , how can fix?

jeanlucmongrain commented 7 years ago

Last commit in this repo is nearly 2 years ago. You guys need to look at https://github.com/therecipe/qt Its maintained and working

QuestionPython commented 7 years ago

i install qt + qtcreator. (help from https://github.com/therecipe/qt/issues/245 )


$ go build qml.go
# command-line-arguments
./qml.go:5:19: fatal error: capi.h: No such file or directory
 // #include "capi.h"
                   ^
compilation terminated.

$ go test
# testmain
2017/03/14 00:22:44 duplicate symbol _cgoexp_0ae46c052b10_hookIdleTimer (types 1 and 1) in github.com/go-qml/qml and /home/guest/go/pkg/linux_amd64/gopkg.in/qml.v1.a(_go_.o)
FAIL    github.com/go-qml/qml [build failed]

How Fix?