devgianlu / go-librespot

Yet another open source Spotify client, written in Go.
GNU General Public License v3.0
75 stars 15 forks source link

undefined reference to `ogg_stream_iovecin' #26

Closed AndreKR closed 5 months ago

AndreKR commented 6 months ago

To get somewhere with the build, I took these steps first:

Then I had to add two new functions to output/driver_windows.go to satisfy the interface:

func (out *output) Drop() error { return nil }
func (out *output) DelayMs() (int64, error) { return 0, nil }

But now I get:

C:/dev/tools/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\andre\AppData\Local\Temp\go-link-407401969\000013.o: in function `_cgo_fb2c7143e03b_Cfunc_ogg_stream_iovecin':
/tmp/go-build/vorbis.cgo2.c:371:(.text+0x35b): undefined reference to `ogg_stream_iovecin'
collect2.exe: error: ld returned 1 exit status

Famously CGO is not Go, and I have no idea what this error even means.

devgianlu commented 6 months ago

To build Windows I've been using a Docker container because that seemed like the easiest way. I have updated https://github.com/devgianlu/go-librespot/pull/4 with the build instructions. I have also rebased on master to fix the missing functions so you may need to git reset.