GoClipse / goclipse

Eclipse IDE for the Go programming language:
http://goclipse.github.io/
Eclipse Public License 1.0
841 stars 290 forks source link

Executable file doesnt exist,executable file build to go\bin,not go_01_hello\bin #188

Closed MayBing closed 8 years ago

MayBing commented 8 years ago

Sorry,I used goclispe for the first time.I had a problem.

\ Building Go project: go_01_hello ** with GOARCH: amd64 with GOOS: windows with GOPATH: D:\work\Tools\MyEclipse\Workspaces\go_01_hello

Running: D:\work\Tools\Go\bin\go.exe install -v -gcflags "-N -l" hello ^^^ Terminated, exit code: 0 ^^^

\ Build terminated. **

go 1.6rc2 os windows 10 eclipse 4.5.1

goclipse 0.14(lastest)

bruno-medeiros commented 8 years ago

What exactly is the problem then? The executable should be in D:\work\Tools\MyEclipse\Workspaces\go_01_hello\bin\hello.exe (if hello is a main package). If the executable is in a different place, then yes, there might be a problem.

MayBing commented 8 years ago

--go_01_hello --GOROOT --Build Targets --./..#build --./.. #build-test -- ./..#[run-tests] --bin --pkg --src --hello --hello.go

when I run project.Problem Occurred.Error message is 'Launching go_01_hello' hs encountered a problem.Executable file (D:work\Tools\MyEclispe\Workspaces\go_01_hello\bin\hello.exe) doesn't exist. this is my project directory tree.

MayBing commented 8 years ago

I had resoved the problem.It seem golang problem.If I set GOBIN(GOBIN=%GOROOT%\bin) environment variable,build project will build to GOROOT\bin.If I remove,this problem does not happen.

zhanyuerong commented 8 years ago

I meet the same problem, but I remove GOBIN, the problem still exist. go 1.6 os windows 10 eclipse 4.5.2 goclipse 0.14.1

hopefully commented 8 years ago

I meet the same problem,please help me,I have no any other idea. By the way, I learned golang for one day....

bruno-medeiros commented 8 years ago

@hopefully did you see the comment about about the GOBIN environment variable? Do you have it set?

antman1p commented 7 years ago

This does not work for me. I am still getting no executable in my project bin or anywhere else for that matter.

bruno-medeiros commented 7 years ago

This does not work for me. I am still getting no executable in my project bin or anywhere else for that matter.

Try building in the command-line first (without using IDE) and see how that goes .

ghost commented 6 years ago

I managed to find the issue, It is no configuration issue or anything. You have to do 3 things as follows,

1) Make sure GOPATH value is different from GOROOT. 2) Make sure GOBIN value is empty. 3) Your package name on the go file in eclipse should be main and not the package name "hello". This should be the case for at least the file that has main function. To do this, File->New go file->Source file type should be -> Command source file-> Empty main function. Then type your code after which you can build to see the the .exe file in GOPATH/bin and the program run.

Worked for me.