This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: expat-1.95.5: undefined reference to `XML_ParserCreate'


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]