Problem at linking libxml2 library in my C project
As @KamilCuk pointed out in the comments, I was defining incorrectly the paths in the gcc options. So the correct command that solved the entire problem was:
gcc test.c -o test -Iinclude/ -Llib/ -l:libxml2.a