gocraft | A Minecraft like game written in go | Game Engine library
kandi X-RAY | gocraft Summary
kandi X-RAY | gocraft Summary
A Minecraft like game written in go, just for fun!.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gocraft
gocraft Key Features
gocraft Examples and Code Snippets
Community Discussions
Trending Discussions on gocraft
QUESTION
I can't change the CC in my go env. I use Windows 10 with Cmder set to bash as admin. I am trying to build and run a go program with go get github.com/icexin/gocraft
but I keep getting the same error cgo: exec gcc: exec: "gcc": executable file not found in %PATH%
. I don't have any third party gcc compilers installed. This is because I only have a lot of C and C++ tools installed with Visual Studio and I don't want to clutter up my path with multiple build tools and confuse any of the C dev tools that I use which rely on Visual Studio's clang version. The path to my Visual Studio clang tool that is a perfectly adequate substitute for a third party gcc (as typed into Cmder) is /c/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/bin/clang-cl.exe
. I tried running:
export CC=/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/bin/clang-cl.exe
,
export CC=/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/bin/clang-cl.exe
,
export CC=C:\Program\ Files\ \(x86\)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\bin\clang-cl.exe
,
none of which worked. How do I change gcc to my Visual Studio clang path? Or change the go env CC variable?
EDIT
I figured out that the problem is that the go env CC
declaration cuts off after C:\Program
. I set the CC
in the Windows Environment Variables, the set
command, and the export
command and go env CC
always cuts off after C:\Program
no matter how I input the file path.
EDIT 2
Look I'm no the only one with this issue:
https://github.com/golang/go/issues/41400
ANSWER
Answered 2021-May-14 at 10:59Use go env to inspect Go environment variables - and the -w
flag to make a change persistent:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gocraft
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page