expat-1.95.5: undefined reference to `XML_ParserCreate'

Norman Vine nhv@cape.com
Sun Dec 22 11:58:00 GMT 2002


Ross Smith  writes:


> I'm trying to compile a simple expat program:
> 
> #include <stdio.h>
> #include <expat.h>
> int main() {
> XML_ParserCreate(NULL);
> return 0;
> }
> 
> but I get:
> 
> $ gcc -lexpat -L/lib expattest.c
> /cygdrive/...:expattest.c: undefined reference to `XML_ParserCreate'

try 
% gcc -o expattest expattest.c -lexpat

the order of the arguments to gcc *matter*

Norman

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list