[GH-ISSUE #30] Building on Windows #19

Closed
opened 2026-02-27 19:28:21 +03:00 by kerem · 4 comments
Owner

Originally created by @sashahilton00 on GitHub (Jan 29, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/30

Issue by NeoLegends
Sunday Apr 24, 2016 at 15:50 GMT
Originally opened as https://github.com/plietar/librespot/issues/77


Even after a couple hours of trying, I still cannot get this library to build on Windows (Rust Nightly 1.10 64-bit GNU). So far I've got the following:

  • Build environment using MSYS2 + MinGW 64
  • Protobuf binaries compiled from sources
  • PortAudio binaries from Github Repo somewhere

Right now I'm having trouble building librespot-protocol, respectively linking against libz (can't find the .dll, linker option: -lz). Using the one from zlib.net doesn't work, because it's not 64-bit, and I'd prefer having a 64-bit executable in the end.

Has anybody tried building librespot on Windows recently? Any ideas on how to do this?

Originally created by @sashahilton00 on GitHub (Jan 29, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/30 <a href="https://github.com/NeoLegends"><img src="https://avatars1.githubusercontent.com/u/1683034?v=4" align="left" width="96" height="96" hspace="10"></img></a> **Issue by [NeoLegends](https://github.com/NeoLegends)** _Sunday Apr 24, 2016 at 15:50 GMT_ _Originally opened as https://github.com/plietar/librespot/issues/77_ ---- Even after a couple hours of trying, I still cannot get this library to build on Windows (Rust Nightly 1.10 64-bit GNU). So far I've got the following: - Build environment using MSYS2 + MinGW 64 - Protobuf binaries compiled from sources - PortAudio binaries from Github Repo somewhere Right now I'm having trouble building librespot-protocol, respectively linking against libz (can't find the .dll, linker option: `-lz`). Using the one from zlib.net doesn't work, because it's not 64-bit, and I'd prefer having a 64-bit executable in the end. Has anybody tried building librespot on Windows recently? Any ideas on how to do this?
kerem 2026-02-27 19:28:21 +03:00
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by jscholes
Sunday Nov 06, 2016 at 22:06 GMT


Anybody made any progress with this?

<!-- gh-comment-id:361258317 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/jscholes"><img src="https://avatars2.githubusercontent.com/u/6454755?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [jscholes](https://github.com/jscholes)** _Sunday Nov 06, 2016 at 22:06 GMT_ ---- Anybody made any progress with this?
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by plietar
Thursday Nov 24, 2016 at 23:30 GMT


I've been working on a (partial) rewrite which, among other things, should support windows (got rid of protobuf and portaudio dependencies). I've just pushed it branch v0.2. You'll probably need a nightly rust to try it.

I've only tried cross compiling using mingw. The audio wasn't completely smooth on my vary slow VM, but it should be alright on a real machine.

There's probably some rough edges. Seeking and caching don't work yet. Oh and the AP is hardcoded to London, change https://github.com/plietar/librespot/blob/v0.2/src/connection/mod.rs#L68 if you don't live around there (use the first value from https://apresolve.spotify.com/).

If your run into any issues, please let me know, preferably on gitter rather than creating a new issue since this is still a WIP.

<!-- gh-comment-id:361258351 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/plietar"><img src="https://avatars0.githubusercontent.com/u/1489775?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [plietar](https://github.com/plietar)** _Thursday Nov 24, 2016 at 23:30 GMT_ ---- I've been working on a (partial) rewrite which, among other things, should support windows (got rid of protobuf and portaudio dependencies). I've just pushed it branch v0.2. You'll probably need a nightly rust to try it. I've only tried cross compiling using mingw. The audio wasn't completely smooth on my vary slow VM, but it should be alright on a real machine. There's probably some rough edges. Seeking and caching don't work yet. Oh and the AP is hardcoded to London, change https://github.com/plietar/librespot/blob/v0.2/src/connection/mod.rs#L68 if you don't live around there (use the first value from https://apresolve.spotify.com/). If your run into any issues, please let me know, preferably on [gitter](https://gitter.im/sashahilton00/spotify-connect-resources) rather than creating a new issue since this is still a WIP.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by sophof
Sunday Nov 27, 2016 at 12:37 GMT


[edit] Never mind, didn't check out v0.2, so I was using master, oops...

Cross compilation works for me from ubuntu vm to windows 10, using mingw-gcc.

<!-- gh-comment-id:361258380 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/sophof"><img src="https://avatars3.githubusercontent.com/u/1485349?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [sophof](https://github.com/sophof)** _Sunday Nov 27, 2016 at 12:37 GMT_ ---- [edit] Never mind, didn't check out v0.2, so I was using master, oops... Cross compilation works for me from ubuntu vm to windows 10, using mingw-gcc.
Author
Owner

@sashahilton00 commented on GitHub (Mar 22, 2018):

Mdns support was added, and it now compiles.

<!-- gh-comment-id:375159706 --> @sashahilton00 commented on GitHub (Mar 22, 2018): Mdns support was added, and it now compiles.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#19
No description provided.