Open zhosi opened 3 years ago
go build -ldflags="-H windowsgui -linkmode internal"
@chenyu1990 unfortunately -linkmode internal causes other problems if you use cgo to bring in other C libraries.
Regarding the rsrc merge failure error, I found the fix for that problem here: https://github.com/josephspurrier/goversioninfo/issues/39
Now I'm just trying to figure out how to work around the i386 incompatibility error.
Ahah, for the incompatibility error, use the -arch amd64 flag with that patched version of rsrc:
rsrc -arch amd64 -manifest test.manifest -o rsrc.syso
Hello, I would like to delete my forks of rsrc and goversioninfo as my quick fix was rather bad. The bug has been properly fixed in rsrc, and I have developed my own tool too for more features: https://github.com/tc-hib/go-winres
D:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `C:\Users\user\AppData\Local\Temp\go-link-214766623\000000.o' is incompatible with i386:x86-64 output C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: $WORK\b001\exe\a.out.exe: .rsrc merge failure: corrupt .rsrc section collect2.exe: error: ld returned 1 exit status
What is the reason for the incompatibility