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' yet: $ nm /lib/libexpat.a | grep XML_ParserCreate 00000000 T _XML_ParserCreate So, I tried compiling expat from source via: cd /usr/src tar xvzf expat-1.95.5.tar.gz ./expat-1.95.5-1.sh conf ./expat-1.95.5-1.sh prep ./expat-1.95.5-1.sh build And tried to build one of their examples (make check, the expat test suite, relies on http://check.sf.net/ to be installed): cd expat-1.95.5/.obj $ gcc -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -I/us r/src/expat-1.95.5/lib -I. -lexpat -L.libs -o examples/outline.c /usr/src/expat-1.95.5/examples/outline.c /cygdrive/...: In function `main': /usr/src/expat-1.95.5/examples/outline.c:60: undefined reference to `_XML_ParserCreate' and I *still* get the same error. I've scanned the mailing list to no avail. What am I possibly doing wrong? -Ross CYGWIN_NT-5.0 DURGA 1.3.17(0.67/3/2) 2002-11-27 18:54 i686 unknown -- 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/