Skip to content

Can't set go environment properly #31733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AvetisSargsian opened this issue Apr 28, 2019 · 2 comments
Closed

Can't set go environment properly #31733

AvetisSargsian opened this issue Apr 28, 2019 · 2 comments

Comments

@AvetisSargsian
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.12.4 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GOARCH=amd64
set GOBIN=F:\GoWorckspace\bin
set GOCACHE=C:\Users\Avetis\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=F:\GoWorckspace
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Avetis\AppData\Local\Temp\go-build710083038=/tmp/go-build -gno-record-gcc-switches

What did you do?

Hello, I am trying to launch my first hello.go example in worckspace directory
here is its structure
F:\GoWorckspace
--bin
-- pkg
-- src
--hello
hello.go

My actions are:
F:\GoWorckspace\src\hello> go install hello.go
or
F:\GoWorckspace\src\hello> go build hello.go
or
F:\GoWorckspace\src\hello> go run hello.go

What did you expect to see?

I expect to see hello.exe in bin folder of worckspace

What did you see instead?

PS F:\GoWorckspace\src\hello> go install hello.go
open C:\Users\Avetis\AppData\Local\Temp\go-build945139258\b001\exe\a.out.exe: The system cannot find the file specified.
PS F:\GoWorckspace\src\hello> go build hello.go
open C:\Users\Avetis\AppData\Local\Temp\go-build409713554\b001\exe\a.out.exe: The system cannot find the file specified.
PS F:\GoWorckspace\src\hello> go run hello.go
open C:\Users\Avetis\AppData\Local\Temp\go-build476595234\b001\exe\hello.exe: The system cannot find the file specified.

@agnivade
Copy link
Contributor

I think you will get better help on the Questions wiki page; it has a list of good places for asking questions.

@odeke-em
Copy link
Member

odeke-em commented May 4, 2019

Thank you for the question @AvetisSargsian and welcome to the Go project!

As @agnivade pointed out, please ask questions using those resources as the Go issue tracker is for bugs with the Go programming language and tools. I'll close this issue but I hope that you can ask the question on those mediums.

@odeke-em odeke-em closed this as completed May 4, 2019
@golang golang locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants