On Mon, Mar 13, 2017 at 8:05 AM, <[email protected]> wrote: > I use Kubuntu 16.10, when compile a project over to windows, I get this > error: > > crosscall2: adddynsym: unsupported binary format > _cgo_panic: adddynsym: unsupported binary format > _cgo_topofstack: adddynsym: unsupported binary format > adddynlib: unsupported binary format > adddynlib: unsupported binary format > > The command I used to compile was: > > export GOOS=windows > go build -ldflags "-H=windowsgui" -o <output-dir> main.go > > if I remove "-H=windowsgui" the problem is gone. What I wanted is to get > rid of console window while run my program on Windows. I found the solution > here: > > http://stackoverflow.com/questions/23250505/how-do-i-create-an-executable-from-golang-that-doesnt-open-a-command-cmd-wind > > Unfortunately it didn't work. Any ideas?
I think it's just a bug. Some conditions that are checking for Hwindows also need to check for Hwindowsgui. Please open a bug report at https://golang.org/issue/new with a complete, small, case we can use to reproduce the problem. Thanks. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
