Home > OS >  Eclipse debug Alsa
Eclipse debug Alsa

Time:02-22

I am trying to add alsa library to my Eclipse in order to cross-compile and debug in my iMX8X. I have cross compiled the alsa-lib by

./configure --host=aarch64-unknown-linux-gnu --with-pcap=linux

I have added the library path where my libasound.so is in properties-> Cross GCC Linker -> libraries (search path), in my case /usr/lib, this is built

aarch64-linux-gnu-gcc -pthread -L/usr/lib -lasound  -o "test1.elf"  ./src/test1.o   

but this error appears in my console and I dont know how to fix it,

/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: no se puede encontrar -lasound

Should I try to compile alsa-utils, firmware, ...? Or how can I debug this in order to use alsa snd_pcm functions? Do I have to add some more files to the library definition?(like libasound.la or libasound.a)

Thanks in advance.

CodePudding user response:

I have created an Ubuntu 20.04 Virtual Box image, compiled there alsa-lib, alsa-utils and alsa-tools libraries. I installed eclipse and link all the libraries in my linker. I managed to compile it by adding -L/usr/lib and -lasound again, deleting the previous one. Make sure where the compilation of your library is and link it in the Cross GCC Linker -> Libraries in a path, which in my case was /usr/lib. No idea why the previous one didnt work.

  • Related