Skip to content
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

Doesn't compile under windows #42

Open
diocore opened this issue Jul 23, 2018 · 3 comments
Open

Doesn't compile under windows #42

diocore opened this issue Jul 23, 2018 · 3 comments

Comments

@diocore
Copy link

diocore commented Jul 23, 2018

Description

Can't get it to work under windows.
Can't compile the example in windows due to the following error:
(this is with the 1.11beta2, with the normal released version in windows. the Realesed 1.10.x version get issues with the filname path to long, but this is a go win issue. Its fixed in 1.11)
c:/program files/mingw-w64/x86_64-7.2.0-win32-seh-rt_v5-rev1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Error: export ordinal too large: 74588

When I cross compile it in Linux I get the following errors:

go build -buildmode=c-shared -o simple.dll FSM.go
github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar /home/dio/.go/src/github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar/wchar.go:15:12: undefined: convertWcharToGoRune /home/dio/.go/src/github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar/wchar.go:23:9: undefined: convertGoRuneToWchar /home/dio/.go/src/github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar/wchar.go:47:9: undefined: convertGoStringToWcharString /home/dio/.go/src/github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar/wchar.go:128:14: undefined: convertWcharStringToGoString /home/dio/.go/src/github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar/wchar.go:141:9: undefined: convertWcharStringToGoString /home/dio/.go/src/github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar/wchar.go:150:9: undefined: convertWcharStringToGoString /home/dio/.go/src/github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar/wchar.go:158:9: undefined: convertWcharToGoRune
my go env:

GOARCH="amd64" GOBIN="" GOCACHE="/home/dio/.cache/go-build" GOEXE=".exe" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="windows" GOPATH="/home/dio/.go" GORACE="" GOROOT="/usr/bin/go" GOTMPDIR="" GOTOOLDIR="/usr/bin/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="x86_64-linux-gnu-gcc" CXX="x86_64-linux-gnu-g++" CGO_ENABLED="0" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-m64 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build621006750=/tmp/go-build -gno-record-gcc-switches"

Details

Go version 1.11beta2 windows /1.10.3 linux
OS windows
@vaiktorg
Copy link

In my case, i can't even 'go get' the files. it throws this error:
# github.com/shadowapex/godot-go/vendor/github.com/vitaminwater/cgo.wchar ..\github.com\shadowapex\godot-go\vendor\github.com\vitaminwater\cgo.wchar\convert.go:10:19: fatal error: iconv.h: No such file or directory compilation terminated.

@diocore
Copy link
Author

diocore commented Jul 23, 2018

Don't know why it says "compile"
You can download it and add it manually to your GOPATH though.
This is at least an easy workaround for your problem.
But I guess the problem is with the compilation rather the "go get"

@viktor-ferenczi
Copy link

viktor-ferenczi commented Sep 6, 2018

For me the error is the following:

C:\Go\bin>go get github.com/shadowapex/godot-go/godot
go build github.com/shadowapex/godot-go/godot: C:\Go\pkg\tool\windows_amd64\compile.exe: fork/exec C:\Go\pkg\tool\windows_amd64\compile.exe: The filename or extension is too long.

"The filename or extension is too long."

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

3 participants