windows - Compile 32 bit binary on 64 bit system -


i've coded go program in 64 bit system want compile 32 bit binary! how can it? 64 bit binary working great have no idea how create 32 bit binary. i'd grateful if me on this!

thanks in advance!

ps: i'm using windows os.

if built go source, can build additional compilers , libraries cpu , os. if on windows/amd64 , want build windows/386, build need compile windows/386:

set goarch=386   cd %goroot%\src   make.bat --no-clean   

once have done that, can build windows/386 executable with:

set goarch=386   cd %your_prog_dir%   go build   

since on windows/amd64, should able run / test windows/386 programs too. make sure set goarch=386 before invoke commands windows/386.

one caveat: not support cgo, cannot use packages use cgo.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -