I'm trying to write a simple program with PulseAudio lib. Everything is fine when it compiles under gcc (gcc -o name_one name_two.cpp -lpulse-simple -lpulse), but when I copy my program to cLion (under cmake) it throws up an error:
main.cpp:49: undefined reference to pa_simple_new
main.cpp:50: undefined reference to pa_strerror
main.cpp:78: undefined reference to pa_simple_drain
main.cpp:72: undefined reference to pa_simple_write
main.cpp:73: undefined reference to pa_strerror
main.cpp:79: undefined reference to pa_strerror
main.cpp:85: undefined reference to pa_simple_free
I've tried to add links (-lpulse-simple -lpulse) into my makeafile.txt like this:
add_compile_options(-lpulse-simple -lpulse)
but this is not working.
How to do it properly?
Aucun commentaire:
Enregistrer un commentaire