I want to get a windows-DLL, but I want to compile it under Ubuntu-Linux.
Building an Executable was simple: env GOOS=windows GOARCH=386 go build wrapper.go generates a wrapper.exe, that behaves as expected.
but building a DLL with env GOOS=windows GOARCH=386 go build -buildmode=c-shared wrapper.go results in error:
running gcc failed: exit status 1
gcc: error: unrecognized command line option ‘-mconsole’; did you mean ‘--compile’?
I would prefer not to install and run go under windows, because my complete tool chain is running under Ubuntu
go version go1.15.6 linux/amd64