andlabs / ui

Platform-native GUI library for Go.
Other
8.34k stars 647 forks source link

Cross Compiling undefined: ui errors #286

Open catafest opened 6 years ago

catafest commented 6 years ago

My example is working well on Fedora , but if I try to create a Windows Cross Compiling version from linux I got this errors. I used go version 1.10.1 linux/amd64 Why ?

[mythcat@desk ~]$ GOOS=windows GOARCH=amd64 go build -o hello.exe go/src/gui_test/main.go 
# command-line-arguments
go/src/gui_test/main.go:8:9: undefined: ui.Main
go/src/gui_test/main.go:9:12: undefined: ui.NewEntry
go/src/gui_test/main.go:10:13: undefined: ui.NewButton
go/src/gui_test/main.go:11:15: undefined: ui.NewLabel
go/src/gui_test/main.go:12:10: undefined: ui.NewVerticalBox
go/src/gui_test/main.go:13:14: undefined: ui.NewLabel
go/src/gui_test/main.go:17:13: undefined: ui.NewWindow
go/src/gui_test/main.go:20:26: undefined: ui.Button
go/src/gui_test/main.go:23:26: undefined: ui.Window
go/src/gui_test/main.go:24:4: undefined: ui.Quit
go/src/gui_test/main.go:24:4: too many errors
andlabs commented 6 years ago

You must cross-compile with cgo (CGO_ENABLED=1 and a few other environment variables — there are more examples throughout this issue tracker. You will need MinGW-w64, which is also available from your distro's package manager.).

CheatCoder commented 6 years ago

GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -x .. You must change the CC/GCC compiler to you`r mingw compiler and the ".." to the project files Then it should work and compile for windows.

AsgerCode commented 6 years ago

I have the same problem and after following @CheatCoder instructions I get:

$ GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -x ./
WORK=C:\Users\andre\AppData\Local\Temp\go-build128234178
mkdir -p $WORK\b080\
cd C:\Go\src\runtime\cgo
CGO_LDFLAGS='"-g" "-O2"' "C:\\Go\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -importpath runtime/cgo -import_runtime_cgo=false -import_syscall=false -- -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror "C:\\Go\\src\\runtime\\cgo\\cgo.go"
cd $WORK
x86_64-w64-mingw32-gcc -fno-caret-diagnostics -c -x c - || true
x86_64-w64-mingw32-gcc -Qunused-arguments -c -x c - || true
x86_64-w64-mingw32-gcc -fdebug-prefix-map=a=b -c -x c - || true
x86_64-w64-mingw32-gcc -gno-record-gcc-switches -c -x c - || true
cd $WORK\b080
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x001.o" -c _cgo_export.c
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x002.o" -c cgo.cgo2.c
cd C:\Go\src\runtime\cgo
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x003.o" -c gcc_context.c
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x004.o" -c gcc_libinit_windows.c
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x005.o" -c gcc_util.c
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x006.o" -c gcc_windows_amd64.c
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x007.o" -c gcc_amd64.S
cd $WORK\b080
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -g -O2 -Wall -Werror -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_cgo_main.o" -c _cgo_main.c
cd C:\Go\src\runtime\cgo
x86_64-w64-mingw32-gcc -I "C:\\Go\\src\\runtime\\cgo" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080=/tmp/go-build" -gno-record-gcc-switches -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_cgo_.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_cgo_main.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x001.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x002.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x003.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x004.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x005.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x006.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x007.o" -g -O2
"C:\\Go\\pkg\\tool\\windows_amd64\\cgo.exe" -dynpackage cgo -dynimport "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_cgo_.o" -dynout "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_cgo_import.go" -dynlinker
cat >$WORK\b080\importcfg << 'EOF' # internal
# import config
EOF
"C:\\Go\\pkg\\tool\\windows_amd64\\compile.exe" -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_pkg_.a" -trimpath "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080" -p runtime/cgo -std -buildid xCoKJkk-6uSKmVxMU29V/xCoKJkk-6uSKmVxMU29V -goversion go1.10.2 -D "" -importcfg "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\importcfg" -pack -asmhdr "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\go_asm.h" -c=4 "C:\\Go\\src\\runtime\\cgo\\callbacks.go" "C:\\Go\\src\\runtime\\cgo\\iscgo.go" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_cgo_gotypes.go" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\cgo.cgo1.go" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_cgo_import.go"
"C:\\Go\\pkg\\tool\\windows_amd64\\asm.exe" -trimpath "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080" -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\" -I "C:\\Go\\pkg\\include" -D GOOS_windows -D GOARCH_amd64 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\asm_amd64.o" "C:\\Go\\src\\runtime\\cgo\\asm_amd64.s"
"C:\\Go\\pkg\\tool\\windows_amd64\\pack.exe" r "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_pkg_.a" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\asm_amd64.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x001.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x002.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x003.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x004.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x005.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x006.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_x007.o" # internal
"C:\\Go\\pkg\\tool\\windows_amd64\\buildid.exe" -w "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_pkg_.a" # internal
cp "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b080\\_pkg_.a" "C:\\Users\\andre\\AppData\\Local\\go-build\\b9\\b95d27d61cef3e20b3457fa073bae5644f1bc7694be501679f37e1c59e4cdc08-d" # internal
mkdir -p $WORK\b082\
cd C:\Users\andre\go\src\github.com\zserge\webview
CGO_LDFLAGS='"-g" "-O2" "-lole32" "-lcomctl32" "-loleaut32" "-luuid" "-lgdi32"' "C:\\Go\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\" -importpath github.com/zserge/webview -- -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\" -g -O2 -DWEBVIEW_WINAPI=1 "C:\\Users\\andre\\go\\src\\github.com\\zserge\\webview\\webview.go"
mkdir -p $WORK\b079\
cd C:\Users\andre\go\src\github.com\ui
CGO_LDFLAGS='"-g" "-O2" "C:/Users/andre/go/src/github.com/ui/libui_windows_amd64.a" "C:/Users/andre/go/src/github.com/ui/libui_windows_amd64.res.o" "-luser32" "-lkernel32" "-lusp10" "-lgdi32" "-lcomctl32" "-luxtheme" "-lmsimg32" "-lcomdlg32" "-ld2d1" "-ldwrite" "-lole32" "-loleaut32" "-loleacc" "-static" "-static-libgcc" "-static-libstdc++"' "C:\\Go\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -importpath github.com/ui -- -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 "C:\\Users\\andre\\go\\src\\github.com\\ui\\area.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\areahandler.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\box.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\button.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\checkbox.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\combobox.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\control.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\datetimepicker.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\draw.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\entry.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\group.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\label.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\link_windows_amd64.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\main.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\progressbar.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\radiobuttons.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\separator.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\slider.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\spinbox.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\stddialogs.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\tab.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\table.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\tablemodelhandler.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\util.go" "C:\\Users\\andre\\go\\src\\github.com\\ui\\window.go"
cd $WORK\b082
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\zserge\\webview" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\" -g -O2 -DWEBVIEW_WINAPI=1 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_x001.o" -c _cgo_export.c
cd $WORK\b079
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x001.o" -c _cgo_export.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x002.o" -c area.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x003.o" -c areahandler.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x004.o" -c box.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x005.o" -c button.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x006.o" -c checkbox.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x007.o" -c combobox.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x008.o" -c control.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x009.o" -c datetimepicker.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x010.o" -c draw.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x011.o" -c entry.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x012.o" -c group.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x013.o" -c label.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x014.o" -c link_windows_amd64.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x015.o" -c main.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x016.o" -c progressbar.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x017.o" -c radiobuttons.cgo2.c
cd $WORK\b082
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\zserge\\webview" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\" -g -O2 -DWEBVIEW_WINAPI=1 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_x002.o" -c webview.cgo2.c
cd $WORK\b079
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x018.o" -c separator.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x019.o" -c slider.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x020.o" -c spinbox.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x021.o" -c stddialogs.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x022.o" -c tab.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x023.o" -c table.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x024.o" -c tablemodelhandler.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x025.o" -c util.cgo2.c
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x026.o" -c window.cgo2.c
cd $WORK
x86_64-w64-mingw32-g++ -fno-caret-diagnostics -c -x c - || true
x86_64-w64-mingw32-g++ -Qunused-arguments -c -x c - || true
x86_64-w64-mingw32-g++ -fdebug-prefix-map=a=b -c -x c - || true
x86_64-w64-mingw32-g++ -gno-record-gcc-switches -c -x c - || true
cd C:\Users\andre\go\src\github.com\ui
x86_64-w64-mingw32-g++ -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x027.o" -c dummy_windows.cpp
cd $WORK\b082
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\zserge\\webview" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\" -g -O2 -DWEBVIEW_WINAPI=1 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_cgo_main.o" -c _cgo_main.c
cd C:\Users\andre\go\src\github.com\zserge\webview
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\zserge\\webview" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082=/tmp/go-build" -gno-record-gcc-switches -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_cgo_.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_cgo_main.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_x001.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_x002.o" -g -O2 -lole32 -lcomctl32 -loleaut32 -luuid -lgdi32
cd $WORK\b079
x86_64-w64-mingw32-gcc -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -I "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\" -g -O2 -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_cgo_main.o" -c _cgo_main.c
cd C:\Users\andre\go\src\github.com\ui
x86_64-w64-mingw32-g++ -I "C:\\Users\\andre\\go\\src\\github.com\\ui" -m64 -mthreads -fmessage-length=0 "-fdebug-prefix-map=C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079=/tmp/go-build" -gno-record-gcc-switches -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_cgo_.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_cgo_main.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x001.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x002.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x003.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x004.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x005.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x006.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x007.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x008.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x009.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x010.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x011.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x012.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x013.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x014.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x015.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x016.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x017.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x018.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x019.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x020.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x021.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x022.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x023.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x024.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x025.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x026.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b079\\_x027.o" static_windows_amd64.syso -g -O2 C:/Users/andre/go/src/github.com/ui/libui_windows_amd64.a C:/Users/andre/go/src/github.com/ui/libui_windows_amd64.res.o -luser32 -lkernel32 -lusp10 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -static -static-libgcc -static-libstdc++
cd C:\Users\andre\go\src\github.com\zserge\webview
"C:\\Go\\pkg\\tool\\windows_amd64\\cgo.exe" -dynpackage webview -dynimport "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_cgo_.o" -dynout "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_cgo_import.go"
cat >$WORK\b082\importcfg << 'EOF' # internal
# import config
packagefile bytes=C:\Go\pkg\windows_amd64\bytes.a
packagefile encoding/json=C:\Go\pkg\windows_amd64\encoding\json.a
packagefile errors=C:\Go\pkg\windows_amd64\errors.a
packagefile fmt=C:\Go\pkg\windows_amd64\fmt.a
packagefile html/template=C:\Go\pkg\windows_amd64\html\template.a
packagefile log=C:\Go\pkg\windows_amd64\log.a
packagefile reflect=C:\Go\pkg\windows_amd64\reflect.a
packagefile runtime=C:\Go\pkg\windows_amd64\runtime.a
packagefile sync=C:\Go\pkg\windows_amd64\sync.a
packagefile unicode=C:\Go\pkg\windows_amd64\unicode.a
packagefile runtime/cgo=$WORK\b080\_pkg_.a
packagefile syscall=C:\Go\pkg\windows_amd64\syscall.a
EOF
"C:\\Go\\pkg\\tool\\windows_amd64\\compile.exe" -o "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_pkg_.a" -trimpath "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082" -p github.com/zserge/webview -buildid IiIpAeo5zVlFLbjVDCcE/IiIpAeo5zVlFLbjVDCcE -goversion go1.10.2 -D "" -importcfg "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\importcfg" -pack -c=4 "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_cgo_gotypes.go" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\webview.cgo1.go" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_cgo_import.go"
"C:\\Go\\pkg\\tool\\windows_amd64\\pack.exe" r "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_pkg_.a" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_x001.o" "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_x002.o" # internal
"C:\\Go\\pkg\\tool\\windows_amd64\\buildid.exe" -w "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_pkg_.a" # internal
cp "C:\\Users\\andre\\AppData\\Local\\Temp\\go-build128234178\\b082\\_pkg_.a" "C:\\Users\\andre\\AppData\\Local\\go-build\\f2\\f2fff73c12fb372ef81a182d3b8ac1ad7cf12dd0ec61380333ca7fdf093f0091-d" # internal
# github.com/ui
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiNewTable':
/tmp/go-build/cgo-gcc-prolog:66: undefined reference to `uiNewTable'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiNewTableModel':
/tmp/go-build/cgo-gcc-prolog:83: undefined reference to `uiNewTableModel'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableAppendTextColumn':
/tmp/go-build/cgo-gcc-prolog:103: undefined reference to `uiTableAppendTextColumn'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableGetSelection':
/tmp/go-build/cgo-gcc-prolog:120: undefined reference to `uiTableGetSelection'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableIterAdvance':
/tmp/go-build/cgo-gcc-prolog:138: undefined reference to `uiTableIterAdvance'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableIterCurrent':
/tmp/go-build/cgo-gcc-prolog:168: undefined reference to `uiTableIterCurrent'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `realuiTableOnSelectionChanged':
C:/Users/andre/go/src/github.com/ui/table.go:12: undefined reference to `uiTableOnSelectionChanged'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiFreeTableModel':
/tmp/go-build/cgo-gcc-prolog:49: undefined reference to `uiFreeTableModel'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableIterComplete':
/tmp/go-build/cgo-gcc-prolog:152: undefined reference to `uiTableIterComplete'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableModelRowChanged':
/tmp/go-build/cgo-gcc-prolog:184: undefined reference to `uiTableModelRowChanged'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableModelRowDeleted':
/tmp/go-build/cgo-gcc-prolog:198: undefined reference to `uiTableModelRowDeleted'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x023.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableModelRowInserted':
/tmp/go-build/cgo-gcc-prolog:212: undefined reference to `uiTableModelRowInserted'
C:\Users\andre\AppData\Local\Temp\go-build128234178\b079\_x024.o: In function `_cgo_4dc24b927ffb_Cfunc_uiTableModelStrdup':
/tmp/go-build/cgo-gcc-prolog:68: undefined reference to `uiTableModelStrdup'
C:/Users/andre/go/src/github.com/ui/libui_windows_amd64.a(stddialogs.cpp.obj): In function `msgbox':
E:/github.com/andlabs/libui/windows/stddialogs.cpp:113: undefined reference to `__imp_TaskDialog'
collect2.exe: error: ld returned 1 exit status
# github.com/ui
In file included from _cgo_export.c:3:0:
..\..\..\github.com\ui\tablemodelhandler.go: In function 'allocTableModelHandler':
..\..\..\github.com\ui\tablemodelhandler.go:23:19: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
 //  h->SetCellValue = doTableModelHandlerSetCellValue;
                   ^
# github.com/ui
..\..\..\github.com\ui\tablemodelhandler.go: In function 'allocTableModelHandler':
..\..\..\github.com\ui\tablemodelhandler.go:23:19: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
 //  h->SetCellValue = doTableModelHandlerSetCellValue;
                   ^

I am using a branch with table support as I need those for the software I am trying to build.

CheatCoder commented 6 years ago

I think this is a problem with your used branch

andlabs commented 6 years ago

Most of those linker errors indicate you are not using such a branch, as its libui_windows_***.a has not been updated.

The rest are #281

Not sure why the warnings are there at the end; they indicate something is ignoring your line comments...

andlabs commented 5 years ago

Does this still happen?