K
K
Kagtaviy2017-02-15 17:11:47
go
Kagtaviy, 2017-02-15 17:11:47

How to compile c windows under linux?

Hello.
I can't find any information on how to properly compile a go application from windows under linux.
Tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2017-02-15
@Kagtaviy

Try setting environment variables:

GOOS=linux
GOARCH=amd64

Then just run go build. If you do not use sish libraries, it should assemble. I successfully assembled under Linux for Windows, only I set, respectively, GOOS=windows

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question