therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.51k stars 748 forks source link

how to code and build in gogland? #614

Closed baofengqqwwff closed 5 years ago

baofengqqwwff commented 6 years ago

hello,i build the main file of the example,it had the following error: This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".

Reinstalling the application may fix this problem. SIGABRT: abort PC=0x7f55b503f428 m=0 sigcode=18446744073709551610 signal arrived during cgo execution

goroutine 1 [syscall, locked to thread]: runtime.cgocall(0xad2b00, 0xc420057ee8, 0x8) /usr/local/go/src/runtime/cgocall.go:128 +0x64 fp=0xc420057ea8 sp=0xc420057e70 pc=0x840644 github.com/therecipe/qt/gui._Cfunc_QGuiApplication_NewQGuiApplication(0x7fff00000001, 0x2020f40, 0x0) _cgo_gotypes.go:13921 +0x4e fp=0xc420057ee8 sp=0xc420057ea8 pc=0x8fc98e github.com/therecipe/qt/gui.NewQGuiApplication(0x1, 0xc420086170, 0x1, 0x1, 0x0) /home/jun/go/src/github.com/therecipe/qt/gui/gui.go:13930 +0xbd fp=0xc420057f48 sp=0xc420057ee8 pc=0x943c2d main.main() /home/jun/go/src/github.com/therecipe/basic-examples/qml/main.go:20 +0x67 fp=0xc420057f88 sp=0xc420057f48 pc=0xa03c67 runtime.main() /usr/local/go/src/runtime/proc.go:198 +0x212 fp=0xc420057fe0 sp=0xc420057f88 pc=0x867b12 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420057fe8 sp=0xc420057fe0 pc=0x88ef71

rax 0x0 rbx 0x7fff9e3a3a20 rcx 0x7f55b503f428 rdx 0x6 rdi 0x343d rsi 0x343d rbp 0x7fff9e3a3a10 rsp 0x7fff9e3a36b8 r8 0x7f55b53d0770 r9 0x7f55b93458c0 r10 0x8 r11 0x202 r12 0x20252a0 r13 0x7fff9e3a39e0 r14 0x7fff9e3a39b0 r15 0x7fff9e3a39f0 rip 0x7f55b503f428 rflags 0x202 cs 0x33 fs 0x0 gs 0x0

Process finished with exit code 2

i have install goqt, and it can be tested successfully, do i need to do some configs of gogland? my system is ubuntu 16.04

therecipe commented 5 years ago

I will close this now, since it was probably caused by an faulty rpath. Please reopen if this is still relevant.