I finally found the way to make the library work. I'll just share here what solved the issue for me, which wasn't any kind of complex solution. I realized I had filled the miniPC with different libiio versions, libraries, compilers, programs and files. Finding it difficult to see clearly what I was referencing at any time, what I was using to debug and compile, what headers I was using, I decided to start a new installation from scratch in a virtual machine in my Windows PC.
I installed Ubuntu from a iso file "ubuntu-24.04.1-desktop-amd64" in VirtualBox, and just followed the instructions found in [https://wiki.analog.com/resources/tools-software/linux-software/libiio] for Debian based distributions and the "Remaining steps1"
Also mention that I needed to create a tasks.json file for the C script to be able to compile and link the libraries. Afterwards, I just used Ctrl + Shift + B to compile.
Mi issue, which was simply to make the library work, was solved with this. I realize that probably I made it more difficult for myself due to my lack of practice programming, but I hope at least this might help somebody. Thanks to the people who answered.