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

Building on Windows #129

Merged
merged 4 commits into from Mar 8, 2016
Merged

Building on Windows #129

merged 4 commits into from Mar 8, 2016

Conversation

ghost
Copy link

@ghost ghost commented Mar 7, 2016

I've made the following changes to make rust-portaudio usable on Windows:

  • println!s rather than panic!s in build
  • no dependency on pkg-config on Windows
  • main on Windows just invokes build

It's still doesn't build portaudio automatically, but after building it manually with Visual Studio as outlined here, and putting portaudio.lib and portaudio_x64.dll in the directory of a test project depending on rust-portaudio, where I copied the examples, I was able to run them. I haven't tested the MinGW toolchain (neither for building portaudio, nor the GNU ABI release of rustc) or 32 bit builds. There is a portaudio package available through MSYS's pacman, though.

I hope I didn't break anything in the Linux/Mac build; sorry if I did, I'm only using Rust for a couple of days now.

@ghost
Copy link
Author

ghost commented Mar 7, 2016

Okay, this does break the Linux build, and now I think disabling pkg-config on Windows whatsoever is wrong anyway, it could be useful on a MinGW build if anyone got around to implement it.

The bottom line would be to disable just the panics, as they're pointless - if the build is going to fail, it will do on it's own when portaudio.lib isn't found.

@ghost
Copy link
Author

ghost commented Mar 7, 2016

Should be better now, although I can't figure out how to print a custom message when rustc fails to find a portaudio.lib.

@mitchmindtree
Copy link
Member

Nice, thanks a lot @marcinmrotek! Any help on improving support for windows is greatly appreciated 😸

Related issue #71

mitchmindtree added a commit that referenced this pull request Mar 8, 2016
@mitchmindtree mitchmindtree merged commit dc1f284 into RustAudio:master Mar 8, 2016
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

Successfully merging this pull request may close these issues.

None yet

1 participant