go compiler install problems on windows 7 amd64

2,749 views
Skip to first unread message

James Eastwood

unread,
Jul 19, 2013, 8:58:32 PM7/19/13
to golan...@googlegroups.com
I have just installed go 1.1.1 on my windows 7 amd64 system using go1.1.1.windows-amd64.msi but the install does not pass the hello.go test.

I have set all environment variables to spec.  I set up my workspace in %HOMEPATH%\Gocode as directed.  I place the hello.go file in %HOMEPATH%\Gocode\src as directed.  This is what happens:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Jim>go env
set GOARCH=amd64
set GOBIN=c:\Go\bin
set GOCHAR=6
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Jim\Gocode
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-g -O2 -m64 -mthreads
set CGO_ENABLED=1

C:\Users\Jim>go run hello.go
GetFileAttributesEx hello.go: The system cannot find the file specified.

Would someone who has set up the go compiler on a windows 7 amd64 system please tell me what is malfunctioning, and what I must correct?
Thank you!

Peace,
James Eastwood

Dave Cheney

unread,
Jul 19, 2013, 9:14:09 PM7/19/13
to James Eastwood, golan...@googlegroups.com
go run is the exception to the rule, it takes a full path to a single Go file, try

cd %HOMEPATH%\Gocode\src 
go run hello.go
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

James Eastwood

unread,
Jul 19, 2013, 9:42:04 PM7/19/13
to golan...@googlegroups.com, James Eastwood
Thank you so much for the heads up!  Works as advertised...

Peace,
James
Reply all
Reply to author
Forward
0 new messages