Closed n0rdik closed 7 years ago
Sorry, I don't know. If you figure it out, please respond with the solution.
Well I found it here: http://stackoverflow.com/questions/19001312/linux-users-please-tell-me-if-you-manage-to-compile-this
The point is to place " -lm -lasound" at the end of the compiling line:
cc -g -O2 -Wall -Wextra -Isrc -rdynamic -DNDEBUG -lrt cpiped.c -o cpiped -lm -lasound
Now it worked. Thanks.
OK, thanks. When I run make on Raspian Jessie, I get:
cc -g -O2 -Wall -Wextra -Isrc -rdynamic -DNDEBUG -lrt -lm -lasound cpiped.c -o cpiped
But, it compiles fine.
I found this: http://stackoverflow.com/questions/28018601/why-am-i-getting-such-error-message-in-installing-package
Try changing LDFLAGS to LDLIBS in Makefile and compile. After that change, I get:
cc -g -O2 -Wall -Wextra -Isrc -rdynamic -DNDEBUG -lrt cpiped.c -lm -lasound -o cpiped
Which still compiles fine for me.
Yes, it also worked changing LDFLAGS to LDLIBS for me, returning this command:
cc -g -O2 -Wall -Wextra -Isrc -rdynamic -DNDEBUG -lrt cpiped.c -lm -lasound -o cpiped
I think that the point is to place the library reference before de source code file. Thanks.
Thanks. I committed the change to the Makefile.
Hello,
I'm trying to complie in my ubuntu box 32 bits but has this errors:
/tmp/ccnkWhD5.o: En la función
myterm': /home/rafa/cpiped/cpiped.c:54: referencia a
snd_pcm_drain' sin definir /home/rafa/cpiped/cpiped.c:55: referencia asnd_pcm_close' sin definir /tmp/ccnkWhD5.o: En la función
main': /home/rafa/cpiped/cpiped.c:233: referencia asnd_pcm_open' sin definir /home/rafa/cpiped/cpiped.c:235: referencia a
snd_strerror' sin definir /home/rafa/cpiped/cpiped.c:238: referencia asnd_pcm_hw_params_sizeof' sin definir /home/rafa/cpiped/cpiped.c:238: referencia a
snd_pcm_hw_params_sizeof' sin definir /home/rafa/cpiped/cpiped.c:239: referencia asnd_pcm_hw_params_any' sin definir /home/rafa/cpiped/cpiped.c:240: referencia a
snd_pcm_hw_params_set_access' sin definir /home/rafa/cpiped/cpiped.c:241: referencia asnd_pcm_hw_params_set_format' sin definir /home/rafa/cpiped/cpiped.c:242: referencia a
snd_pcm_hw_params_set_channels' sin definir /home/rafa/cpiped/cpiped.c:243: referencia asnd_pcm_hw_params_set_rate_near' sin definir /home/rafa/cpiped/cpiped.c:247: referencia a
snd_pcm_hw_params_set_period_size_near' sin definir /home/rafa/cpiped/cpiped.c:250: referencia asnd_pcm_hw_params' sin definir /home/rafa/cpiped/cpiped.c:252: referencia a
snd_strerror' sin definir /home/rafa/cpiped/cpiped.c:257: referencia asnd_pcm_hw_params_get_period_time' sin definir /home/rafa/cpiped/cpiped.c:260: referencia a
snd_pcm_hw_params_get_period_size' sin definir /home/rafa/cpiped/cpiped.c:300: referencia asnd_pcm_readi' sin definir /home/rafa/cpiped/cpiped.c:316: referencia a
sqrt' sin definir /home/rafa/cpiped/cpiped.c:303: referencia asnd_pcm_prepare' sin definir /home/rafa/cpiped/cpiped.c:307: referencia a
snd_strerror' sin definirSorry, it's in spanish. I have libasound2-dev installed, but I thing I'm missing any other package. Can you help me? Thanks in advance.