-
Notifications
You must be signed in to change notification settings - Fork 122
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
Unable to build for windows #120
Comments
In case this helps anyone else - I was able to fix this by installing a cross-compile version of gcc. I'm using Arch, but the package names should be similar on other distros:
set additional flags when building:
|
After further testing, the previous method, still had issues. The app would compile fine, but when running on a Windows machine, it was missing some required dll's for the c standard library. The easiest way I found to get around this was surprisingly to use zig to compile. https://dev.to/kristoff/zig-makes-go-cross-compilation-just-work-29ho Using this method, I get a static binary that works on Windows and doesn't require any additional dependencies |
Sorry i overlooked this thread even though we can add our experience to it. (Vacation are bad for your mail queue!) We are building https://symflower.com for Linux/MacOS/Windows for different architectures. For Windows we are using https://github.com/mstorsjo/llvm-mingw which works great! I had multiple looks into Zig (did not look into the latest 0.11 release though!) and i had smaller compilation problems that were solvable but the binaries crashed in various scenarios. I tracked down most of them in open issues, don't know their current state, i just wanted to note: if your binary crashes, might be because of compiling with Zig, so please let them know. One option that we are using is Your original problem #120 (comment) i can explain. AFAIK if you are cross compiling, CGO is disabled, so you need to explicitly enable it with |
I have the same issue , can you please help me out? |
Whats the solution for those on Windows? |
@Owatron @Borwe i guess https://www.mingw-w64.org/ is a compiler for Windows? Please let me know if it worked. |
When I try to build this library with windows as a target I'm getting several errors in iter.go:
When building for linux, the build succeeds as expected. I can see 'Node' is defined in bindings.go and both iter.go and bindings.go are part of the sitter package so I''m not sure why this error occurs.
The text was updated successfully, but these errors were encountered: