简体   繁体   中英

How to use cgo in Goclipse with Mingw?

When i try to use cgo I get the error

exec gcc: exec: "gcc": executable file not found in %PATH%

I have Mingw installed. How do I tell Goclipse where gcc is? I could not find a way in preferences or properties to set this.

Add the path to MinGW gcc to your Windows PATH environment variable.

Setting environment variables under Windows

I had the same problem and just wanted to add that you specifically need to add the path to the bin directory of MinGW to your PATH environment variable. Something like:

C:\\Program Files\\mingw-w64\\x86_64-7.1.0-posix-seh-rt_v5-rev0\\mingw64\\bin

Not enough reputation to make this a comment, so it's an answer.

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