veandco / go-sdl2-examples

This is where all go-sdl2 examples are stored
91 stars 34 forks source link

recording-audio.go is not working for me... #8

Closed Nikkolix closed 4 years ago

Nikkolix commented 4 years ago

Hi veandco,

When I run the recording-audio.go file I get this error message: C:\Users*****\AppData\Local\Temp\go-build233611566\b001_cgo_main.o:/tmp/go-build/cgo-generated-wrappers:2: undefined reference to `OnAudio' collect2.exe: error: ld returned 1 exit status

Can you help me with this?

Thanks GNK03

Sorry, I copy pasted the file and for whatever reason there was an empty line every second line. Between "//export OnAudio" and "func OnAudio(userdata unsafe.Pointer, _stream *C.Uint8, _length C.int) {" can't be an empty line. This caused the error.