ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/05/16/10:33:44

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <464B11DF.1070901@mainstreetsoftworks.com>
Date: Wed, 16 May 2007 10:14:55 -0400
From: Brad House <brad AT mainstreetsoftworks DOT com>
User-Agent: Thunderbird 2.0.0.0 (X11/20070426)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Using libxml2 with DJGPP
References: <46476A40 DOT 2040707 AT schluessler DOT org> <f28d3k$trm$1 AT aioe DOT org> <46487E3A DOT 9070400 AT iki DOT fi> <46488203 DOT 9080203 AT schluessler DOT org> <46488CD1 DOT 3020208 AT schluessler DOT org> <4648B4EB DOT 8020607 AT iki DOT fi> <464B03C4 DOT 4020009 AT schluessler DOT org>
In-Reply-To: <464B03C4.4020009@schluessler.org>
Reply-To: djgpp AT delorie DOT com

> When I use the binaries from http://ap1.pp.fi/djgpp/other/djbuild.html
> and licv17b.zip from a DJGPP mirror, gcc gives the same errors as it
> does before my first mail. To become more concrete, here are the errors:
> 
> bash-2.04$ gcc -Lxml2 win_dirparselog.c -o parser.exe
> c:\programme\djgpp\tmp/ccANk2mO.o(.text+0x4ad):win_dirparselog.c:
> undefined refe
> rence to `_xmlCheckVersion'


Please note the difference between the '-L' and '-l' flags to gcc.
From the man pages:

-Ldir
           Add directory dir to the list of directories to be searched for -l.


-llibrary
       -l library
           Search the library named library when linking.  (The second alternative with the library as a separate argument is only for
           POSIX compliance and is not recommended.)

           It makes a difference where in the command you write this option; the linker searches and processes libraries and object files
           in the order they are specified.  Thus, foo.o -lz bar.o searches library z after file foo.o but before bar.o.  If bar.o refers
           to functions in z, those functions may not be loaded.

           The linker searches a standard list of directories for the library, which is actually a file named liblibrary.a.  The linker
           then uses this file as if it had been specified precisely by name.

           The directories searched include several standard system directories plus any that you specify with -L.

           Normally the files found this way are library files---archive files whose members are object files.  The linker handles an ar-
           chive file by scanning through it for members which define symbols that have so far been referenced but not defined.  But if the
           file that is found is an ordinary object file, it is linked in the usual fashion.  The only difference between using an -l
           option and specifying a file name is that -l surrounds library with lib and .a and searches several directories.




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019