Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Helloworld does not compiled #703

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
fpawel opened this issue Sep 17, 2017 · 3 comments
Closed

Helloworld does not compiled #703

fpawel opened this issue Sep 17, 2017 · 3 comments

Comments

@fpawel
Copy link

fpawel commented Sep 17, 2017

Code from GopherJS Playground:

package main
import (
	"fmt"
	"github.com/gopherjs/gopherjs/js"
)
func main() {
	fmt.Println("Hello, playground")
	js.Global.Call("alert", "Hello, JavaScript")
	println("Hello, JS console")
}
$ gopherjs build
C:\Go\src\internal\poll\fd_windows.go:367:22: invalid operation: fd.pd (variable of type pollDesc) has no field or method runtimeCtx
C:\Go\src\internal\poll\fd_windows.go:368:22: invalid operation: fd.pd (variable of type pollDesc) has no field or method runtimeCtx
C:\Go\src\internal\poll\fd_windows.go:157:5: invalid operation: o.fd.pd (variable of type pollDesc) has no field or method runtimeCtx
$ go version
go version go1.9 windows/amd64
$ gopherjs version
GopherJS 1.9-1

The code is compiled if comment out "fmt":

package main
import (
	//"fmt"
	"github.com/gopherjs/gopherjs/js"
)
func main() {
	//fmt.Println("Hello, playground")
	js.Global.Call("alert", "Hello, JavaScript")
	println("Hello, JS console")
}
@dmitshur
Copy link
Member

You'll need to use GOOS=darwin gopherjs build when building on Windows at this time.

This is the same issue as #688, closing as duplicate.

@fpawel
Copy link
Author

fpawel commented Sep 18, 2017

I'm sorry. Thank you.

@dmitshur
Copy link
Member

It's no problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants