Use -no-upgrade, it works. But do it from a clean tree, otherwise things that were built without -no-upgrade may still be used. Clean using build.go clean if you like.
Thank you Jakob. I’m not sure on the build.go clean… Do I run that as part of the same command string when I build with -no-upgrade? Or is that a separate step?
Thanks again. That works great for my Windows build.
I tried to build a Linux Binary, but it failed using that method. I get this error several times as it attempts to build:
crosscall_amd64: adddynlib: unsupported binary format
And then at the end, it shows:
exit status 2
exit status 1
Any ideas? This is using my custom build.go that uses the -H=windowsgui flag… But I thought from reading other posts that I could keep that flag across platforms.