ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/05/16/15:34:32

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <464B5C92.6010404@iki.fi>
Date: Wed, 16 May 2007 22:33:38 +0300
From: Andris Pavenis <andris DOT pavenis AT iki DOT fi>
User-Agent: Thunderbird 2.0.0.0 (X11/20070326)
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> <464879E4 DOT 3030300 AT schluessler DOT org> <464b00a6$0$4613$61c65585 AT un-2park-reader-01 DOT sydney DOT pipenetworks DOT com DOT au> <464B278D DOT 7090803 AT schluessler DOT org>
In-Reply-To: <464B278D.7090803@schluessler.org>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l4GJXeNQ001439
Reply-To: djgpp AT delorie DOT com

Timo Schlüßler kirjoitti:
> caddit wrote:
>> Hi Timo.
>>
>>
>>> Now I know that i have to use the wingnu bash and wingnu make and all
>>> theese gnu windows programm to compile libxml2 for DJGPP (not as i did
>>> it with native linux, what makes no sense). And when i have all the gnu
>>> functions for win, i can compile iconv too.
>>
>>
>> I'm not sure I correctly understood all that. Please be sure that *you*
>> understand what DJGPP 2.04 is: a development *platform*. *Mixing* 
>> platforms
>> is generally a *very* bad idea for any kind of development environment.
>> I.E. you would never try to run a complex DOS batchfile straight from a
>> UNIX shell, or expect winsock.dll to run linux networking. They come from
>> incompatible OSes and different *platforms*.
>>
>> In summary, for each platform you want to develop you need the 
>> developer's
>> toolchain for *that* platform. DJGPP has it's own bash, perl, gawk, sed,
>> autoconf, gcc and related libraries. Windows has a different set, Cygwin
>> has another, Wattcom another, etc. You generally don't mix them.
>>
>> Even toolchain components from different *versions* of the *same* 
>> platform
>> (i.e. DJGPP 2.03 vs. DJGPP 2.04) shouldn't be mixed at risk of major
>> borkage unless you know what you're doing.
>> Regards,
>> Ben
>>
> 
> Thx for your summary :)
> All what you have written I shouldn't do, I did before I wrote my first 
> mail.
> 
> But see the mail I've written 13 minutes after yours.
> 
> 
> @Brad House: First I tried it with -l, but then I tried -L because there 
> wasn't a change if I supplied -l or not.
> 
> 
> I'VE FOUND THE MISTAKE: I only specified -lxml2 and -liconv but I have 
> to specify `xml2-config --libs` and with --cflags, as I have to do it 
> under linux. (Also I found out, that I can compile the very normal linux 
> packet for zlib under DJGPP :D)
> 
> 
> But now there is another error :( . This is the error:
> bash-2.04$ gcc `xml2-config --libs` win_dirparselog.c `xml2-config 
> --cflags` -o parser.exe
> c:/programme/djgpp/bin/ld.exe: cannot find -lgcc
> collect2: ld returned 1 exit status

Something is wrong with Your DJGPP installation. Try adding command line option
-v (gcc -v ...) to get more information. If still enough You can try also
-Wl,--verbose

That will not fix the problem, but should give more information

> xml2-config --libs is:   -L/dev/env/DJDIR/lib -lxml2 -lz -liconv -lm
> xml2-config --cflags is: -I/dev/env/DJDIR/include/libxml2
> 
> So there isn't a -lgcc!! I also tried specifying -I<PATH_TO_libgcc.a> 
> but this doesn't help.
> 
> (Is there a way to put the line including `xml2-config --libs` in a 
> Makefile? When I did it, he didn't parse the `command` .. )

Read docs of GNU make:

LIBS = $(shell xml2-config --libs)

I myself used pkg-config for DJGPP (if I remember correctly)


- Raw text -


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