I am following go documentation and try to run hello.go. I am on Windows 7 and install go 1.1.2 using msi installer. I have file "C:\Go\pkg\tool\windows_386\8g.exe" (see dir output below), but when I do 'go.exe run hello.go', I get the file does not exist error.
Please help. Thank you.
C:\>go.exe run hello.go
go build command-line-arguments: exec: "C:\\Go\\pkg\\tool\\windows_386\\8g.exe":
file does not exist
C:\>go.exe version
go version go1.1.2 windows/386
C:\>go.exe run hello.go
go build command-line-arguments: exec: "C:\\Go\\pkg\\tool\\windows_386\\8g.exe":
file does not exist
C:\>dir C:\\Go\\pkg\\tool\\windows_386\\8g.exe
The specified path is invalid.
C:\>dir C:\Go\pkg\tool\\windows_386\\8g.exe
Volume in drive C is Local Disk
Volume Serial Number is C07E-54F5
Directory of C:\Go\pkg\tool\windows_386
08/13/2013 07:04 AM 1,831,416 8g.exe
1 File(s) 1,831,416 bytes
0 Dir(s) 11,407,892,480 bytes free
From issue 6224, this error happens if you had the environment variable PATHEXT
set to only one extension, before running go.exe
.
set PATHEXT=.BAT
go run hello.go
What is the expected output?
no errors and hello world program runsWhat do you see instead?
go build command-line-arguments:
exec: "c:\\Go\\pkg\\tool\\windows_386\\8g.exe": file does not exist
8g Windows 7 64bit go version go1.1.2 windows/386
On my computer (W7 64 bits), I have:
set pa
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
and everything runs just fine.
LookPath
is called with "c:\Go\pkg\tool\windows_386\8g.exe
" and the fact thatPATHEXT
is being set in an evil way let's say, makeLookPath
fails
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With