-
Notifications
You must be signed in to change notification settings - Fork 90
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
Can't Compile #109
Comments
Do you have freetype6 installed? Windows 10 comes with choco doesn't seem to have a native package, unfortunately. |
I think I have freetype 6 installed. I'll check again. |
Apparently, I installed the 32 bit version. I used EDIT: Now, it's installed but nothing changed. |
I give up. I'll try to redo this some other time. |
@Carbon-Labs Some people have been working on this lately. freetype-sys has updated the README that tells how to install Freetype on Windows. See https://github.com/pistondevelopers/freetype-sys |
Ok! I'll check it out now! (I didn't check this issue anymore after closing, so I'm 7 days late!) |
Still not working. I'm going to reinstall everything again. |
New error:
I am ABSOLUTELY sure C:\msys64\mingw64\bin is in path. |
The previous one was from the MSYS2 terminal. This one is from the MinGW terminal
Absolute same config. |
I did the instructions above (after I removed my original rustc installation), and am able to compile & run the project successfully. |
The way I see it, the freetype-sys guiding page doesn't really show the fact that you cannot install C compilers when you install Rust. I'll make a PR to freetype-sys later to improve this. EDIT: |
I'll try a reinstall. |
Might be because of the linker. |
Well... Didn't work. |
Well I tested my rustc installed in my office and it fails too. |
来自 魅族 MX4 Pro -------- 原始邮件 --------
|
Still stuck here... |
I guess you can As I said above, my environment in my office also doesn't compile piston after reinstall, and when I go back to my office 10 hours later, I'll try this method. |
Oh I tried this idea on my laptop first, you can see if this works for you. This time I use a Rust installation totally without MSYS2, so remember to install linkers when you install Rust. But I'll get freetype from MSYS2. Now EDIT: fixed typo |
Actually, I use a x86_64 architecture. (My error shows that.) I'll try that. |
Sorry it's |
It worked on Arch Linux. Still not working on Windows, though. |
I have absolutely the same issue on windows 10. So is it possible to compile examples in windows? |
Probably. I still haven't figured out how though. Try it on another OS first, and just experiment. |
It was pure PITA but I did it.
But, to run it normally, from Explorer, you have to download precompiled freetype.dll and put it along with .exe. ps |
Cool. I'll see if it works. |
If anyone gets this working let me know. The whole process of trying to get this to compile on windows is a complete mess; even if I get it to compile it fails to run, with the same compile_shader error that @DGolubets mentioned above |
I'm also experiencing the compile_shader error mentioned by @DGolubets and @MrEnzyme. Windows 10, Rust 1.8.0 (MSVC), cargo 0.9.0-nightly Full error message:
Using code from the getting-started tutorial, just copy-pasted it. |
There's a line in the example code that says
I did so, but got this error message instead:
|
That's annoying.. it DID work before I upgraded to Rust 1.8. |
The source of error is this line: GlGraphics::new(opengl). We really need new, updated and tested tutorial from Piston team. |
What dependencies do I need for that example? My cargo can't find the crate: error: can't find crate for |
piston_window = "0.42.0" |
Oooh! Finally got something on screen :) Thank you very much! |
Now I've rebuilt the spinning-square example to use PistonWindow instead, guided by the example you linked. See code below. Now, as I am a complete Rust and Piston noob, the code is probably stupid in many ways. In particular:
If it's not too stupid I would be happy to issue a PR. |
@joelwkall Beware, that I'm also Piston and Rust noob yet :) Nevertheless here is what I think:
I think you might be interested in tracking or bumping this issue: PistonDevelopers/piston#1048. As you have already noticed: many things are not obvious in Piston yet, like different windows\events (and I'm afraid it's just a tip of an iceberg :D) |
@joelwkall piston_window uses the OpenGL backend of Gfx. The version used to create the window must be the same as the version used to pick shaders, or else it will try to compile shaders for an OpenGL version that does not support the syntax/features. If you have an old driver or running in a virtual machine, you might need to change to OpenGL 2.1.
Please open up new issues if the problem is not the same as in the top comment. This makes it easier for people to understand what the issue is about and less things to keep track of. |
Many thanks to @DGolubets and @bvssvni for the info. I think I have what I need to start coding :) Apologies if I hijacked this issue! |
Thanks @DGolubets, I was having issues with the freetype linking deal.
Did the trick for me. |
Those looking for an interactive example that does not require freetype: https://github.com/PistonDevelopers/piston_window/blob/master/examples/hello_piston.rs @joelwkall's example does not work on The current Piston-Tutorial example is unfortunately very difficult to get working on Windows. #130 |
I was also facing the same issue "failed to run custom build command for 'miniz-sys v0.1.6' |
I'm trying to use Piston, but am encountering some compiling problems. I'm on Windows 10 using MSYS2, and everything had worked well with cargo right until now. I followed the instructions in 'Getting Started' but still can't do anything. Apologies for my ignorance on the error messages:
I'm guessing it's an environment variable problem? Although I've tried it...
The text was updated successfully, but these errors were encountered: