techknowlogick / xgo

Go CGO cross compiler
MIT License
478 stars 79 forks source link

Add support for the headtype windowsgui #230

Closed oSethoum closed 1 year ago

oSethoum commented 1 year ago

Hi, am trying to cross compile my app and I wanna use it in windows without cmd, for that go support the headtype -H="windowsgui" with -ldflags, the build panics when I use it like this

 xgo -ldflags="-s -w -H windowsgui" -targets=windows/amd64,darwin/amd64,linux/amd64 --out=bin/server .
bearsh commented 1 year ago

maybe you should call xgo twice, once for the windows target with -H windowsgui and once for the other targets without it.

oSethoum commented 1 year ago

@bearsh I will try it and see, thank you.

techknowlogick commented 1 year ago

Yup, what @bearsh said. It'll otherwise try to apply to each build when windowsgui should(?) just be applied to the windows build.

oSethoum commented 1 year ago

@bearsh it worked, again thank you.