Download initial Windows port of go here

47 views
Skip to first unread message

Hector

unread,
Nov 23, 2009, 4:35:37 AM11/23/09
to golang-nuts
http://code.google.com/p/go-windows/

It's a bit rough and doesn't have all the packages you'd expect but it
can at least run the examples in the go tutorial. Better than nothing
and should provide hours of fun.

Sylvain

unread,
Nov 23, 2009, 5:18:22 AM11/23/09
to golang-nuts
Great work !
Just tested "sieve.go" and it works fine.

David Anderson

unread,
Nov 23, 2009, 7:45:31 AM11/23/09
to Hector, golang-nuts
Nice work!

I suggest that you start submitting your patches for review back to
the Go mainline sooner rather than later, so that the task of
integrating your contributions doesn't become too huge. It'll also get
the attention of the Go developers on your code, which may lead to
some improvements/tweaks that will be harder to make later.

- Dave

Hector Chu

unread,
Nov 23, 2009, 7:53:27 AM11/23/09
to David Anderson, golang-nuts
I will definitely try to get my work into the main Go repository over
the next few weeks so a solid base is available for further Windows
development work. I know the task will be lengthy and won't be easy
so I will concentrate on this before doing any further work.

2009/11/23 David Anderson <da...@natulte.net>:

Dimiter "malkia" Stanev

unread,
Nov 23, 2009, 3:56:23 PM11/23/09
to golang-nuts
Thanks a lot, Hector!

Edward Marshall

unread,
Nov 23, 2009, 4:03:20 PM11/23/09
to golang-nuts
On Mon, Nov 23, 2009 at 3:35 AM, Hector <hect...@gmail.com> wrote:
It's a bit rough and doesn't have all the packages you'd expect but it
can at least run the examples in the go tutorial.  Better than nothing
and should provide hours of fun.

This should be painfully obvious, but since I got tripped up by it because I wasn't thinking clearly, I'll mention it for others: GOROOT needs to be set to a Windows path, not a Cygwin path. (This is a mingw application, after all.)

So, instead of:

GOROOT=/home/esm/go

It should be:

GOROOT=C:\\cygwin\\home\\esm\\go

Great work, Hector!

--
Ed Marshall <e...@logic.net>
Felix qui potuit rerum cognoscere causas.
http://esm.logic.net/

Ali Collins

unread,
Nov 24, 2009, 6:26:18 AM11/24/09
to golang-nuts
Please excuse the newbie question, but could someone do a step by step
- I want to have a play with this but can't get it working, and want
to see whether there's a problem (using a work PC with some limits on
it!) or whether I've made a mistake somewhere along the way.

Thanks, Ali.

Hector

unread,
Nov 24, 2009, 9:46:31 AM11/24/09
to golang-nuts
What are the symptoms of the problem?

On Nov 24, 11:26 am, Ali Collins <alistaircollin...@googlemail.com>
wrote:

Andre

unread,
Dec 10, 2009, 10:38:13 AM12/10/09
to golang-nuts
Looks good Hector.
Could you explain how do you port it?

Ganesh

unread,
Dec 17, 2009, 4:09:02 AM12/17/09
to golang-nuts
Hi Hector

I also downloaded the zip file from http://go-windows.googlecode.com/files/go-1.zip

It would be great if you can give a step-by-step example to let users
know how to get it working.

----
D:\Tools\go\bin>cat first.go
package main

import "fmt"

func main() {
fmt.Printf("hello, world\n")
}

D:\Tools\go\bin>8c.exe first.go
first.go:1 not a function
first.go:1 syntax error, last name: main

----

I am absolute newbie to Go and I have only Windows installed now. Can
you please help me how to get this hello program working?

Thanks!

Ganesh

> > Thanks, Ali.- Hide quoted text -
>
> - Show quoted text -

Rob 'Commander' Pike

unread,
Dec 17, 2009, 4:39:23 AM12/17/09
to Ganesh, golang-nuts

On 17/12/2009, at 8:09 PM, Ganesh wrote:

> Hi Hector
>
> I also downloaded the zip file from http://go-windows.googlecode.com/files/go-1.zip
>
> It would be great if you can give a step-by-step example to let users
> know how to get it working.
>
> ----
> D:\Tools\go\bin>cat first.go
> package main
>
> import "fmt"
>
> func main() {
> fmt.Printf("hello, world\n")
> }
>
> D:\Tools\go\bin>8c.exe first.go
> first.go:1 not a function
> first.go:1 syntax error, last name: main
>
> ----
>
> I am absolute newbie to Go and I have only Windows installed now. Can
> you please help me how to get this hello program working?

I don't know much about the windows port but: 8g is the Go compiler.
8c is the C compiler. You're running the wrong compiler.

-rob


abiosoft

unread,
Dec 17, 2009, 6:31:01 AM12/17/09
to golang-nuts
I've tried it and it's working pretty fine.

Can some please write the windows .bat equivalent of MakeGo for me.

And how can one add more packages to this go-windows?

abiosoft

unread,
Dec 17, 2009, 6:41:07 AM12/17/09
to golang-nuts
all you have to do is set these three environment variables

GOROOT = <the extracted go folder>
GOARCH = 386
GOOS = mingw

and you may add <the extracted go folder>\bin to your PATH for easy
access through command prompt.

On Dec 17, 10:09 am, Ganesh <sggan...@gmail.com> wrote:
> Hi Hector
>

> I also downloaded the zip file fromhttp://go-windows.googlecode.com/files/go-1.zip

Reply all
Reply to author
Forward
0 new messages