简体   繁体   中英

Error go build using gcc on windows

I'm working on hyperledger fabric sdk client on my computer which is running on Windows 10 64 bits but my problem is general with Go. In order to do the go build command on my .go file, I had to install gcc. So I installed cygwin 64 bits for Windows. In the bin repository, I had 3 differents .exe for gcc. I tried all of them :

  • gcc.exe : I have an error because this .exe is for windows 32 bits and go is 64 bits
  • x86_64-w64-mingw32-gcc.exe : I have an error, this .exe isn't able to find -lltdl
  • x86_64-pc-cygwin-gcc : This .exe isn't able to find -lmingwex and -lmingw32

The solution proposed on some subject was to install TDM-GCC-64, but when I do that, I have an error : ltdl.h not found

So if anyone have any idea in order to solve this issue, it will be great ! Thank you :)

PS : Sorry for my english

You're jumping to conclusions without thinking. Windows X64 has full support for 32-bit .exe, but of course you must avoid trying to mix 32-bit and 64-bit applications. You will need to look up how to install libtool or libltdl (.dll and .h) corresponding to whichever gcc version you end up choosing. It's unclear on the cygwin web page whether that is supported for cygwin64. Also, you may need to think about whether you want cygwin gcc and go or a mingw version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM