In article <11**********************@p77g2000hsh.googlegroups .com>,
geoplab <ge*****@gmail.comwrote:
>I have this error message when compiling mx_init.c by linking libxml
library as follow:
>gcc `xml2-config --cflags` -c mx_init.c `xml2-config --libs` -g -Wall
gcc: -lxml2: linker input file unused because linking not done
gcc: -lz: linker input file unused because linking not done
gcc: -lpthread: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done
>How can I fix this error?
gcc and libraries are not really on topic in comp.lang.c, which
deals with the C language rather than with the specifics of
any implementation.
<OT>
Read the output. The libraries were not used because linking
was not done. Why was linking not done? Because you told it not
to link.
$ man gcc
-c Compile or assemble the source files, but do not link. The link-
ing stage simply is not done.
--
I was very young in those days, but I was also rather dim.
-- Christopher Priest