Closed iamshreeram closed 4 years ago
@iamshreeram The extension itself don't set those environment variables, but inherit from what VS Code itself sees. Are those CC
and CXX
environment variables set in any of your login shell (https://code.visualstudio.com/docs/editor/integrated-terminal#_why-are-there-duplicate-paths-in-the-terminals-path-environment-variable-andor-why-are-they-reversed) or in the terminal app where you launched the code
app for the first time? You can check that by inspecting "Developer: Toggle Developer Tools" -> From the "Console" tab, query process.env.CC
or process.env.CXX
. If they are undefined, they were not set.
The next thing to check is whether other extensions are setting them - this can be done by disabling all other extensions, and checking the process.env.CC.
Meanwhile you can set the environment variables used for tools by setting go.toolsEnvVars
.
@hyangah , Both process.env.CC
and process.env.CXX
are empty. They are returning undefined
.
Thanks for go.toolsEnvVars
. This is working.
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env GOOS GOARCH
to get the operating system and processor architecture detailsDescribe the bug
vs-code is using different CC and CXX from what is configured in my system. Is there a way to configure it manually?
Steps to reproduce the behavior:
go env
CC="x86_64-apple-darwin13.4.0-clang"
andCXX="x86_64-apple-darwin13.4.0-clang++"
.CC="clang"
andCXX="clang++"