Adjustments for libxml2
Closed this issue · 2 comments
prvst commented
Hi, I know that this is not a real issue with your C Makefile, but I need to reorganize some directives in order to compile a project containing the libxml2 libraries.
According to other users:
The libraries should be specified only after the source file so that the linker can resolve the undefined references in the source file.
gcc -I/usr/local/include/libxml2 -L/usr/local/lib xmltest.c -lxml2 -lm
I would be really grateful if you could point to me where to do the changes without braking anything else.
Thanks
mbcrawfo commented
Sorry for the delay. -I/usr/local/include/libxml2
should be added to the INCLUDES
option, and -L/usr/local/lib -lxml2 -lm
should be added to LINK_FLAGS
.