delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/08/30/09:04:31

X-Spam-Check-By: sourceware.org
Message-ID: <587d37680708300603j2db3140cw1c8ca9302916e7c5@mail.gmail.com>
Date: Thu, 30 Aug 2007 18:33:53 +0530
From: "Senthil Nathan" <rsennat AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ldconfig problem
In-Reply-To: <46D6B81B.4010609@cygwin.com>
MIME-Version: 1.0
References: <587d37680708292245t687eb4ban4c512ba6e6f6c566 AT mail DOT gmail DOT com> <587d37680708292247k5bf8a21en423298d5b72cfb67 AT mail DOT gmail DOT com> <46D6B81B DOT 4010609 AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 8/30/07, Larry Hall (Cygwin) <reply-to-list-only-lh AT cygwin DOT com> wrote:
> Senthil Nathan wrote:
> > Hi,
> > I'm using cygwin for the first time to compile my programs.
> >
> > I get the following error during dynamic loading of my libraries.
> > And I came to know that there is no concept of "ldconfig".
> >
> > So how do I load my dynamic libraries while compiling.
> >
> > this is the command i run on linux platform, which works well.
> > $ gcc `xml2-config --cflags --libs` -o save save.c  --> /usr/local/lib
> > has the library to linked with this.
> >
> > but how do i compile this in cygwin.
> > and the error I get in cygwin is,
> > /cygdrive/c/DOCUME~1/che02099/LOCALS~1/Temp/ccWWThmX.o:save.c:(.text+0x15c):
> > undefined reference
> > collect2: ld returned 1 exit status
>
> Order matters on Win32 platforms.  You *may* find the following resolves
> the link problem you were seeing:
>
> gcc `xml2-config --cflags` -o save save.c `xml2-config --libs`
>
> Note: I didn't try the above and I have no experience with xml2-config.
> YMMV.

Hi Larry Hall,
Thanks. That worked and linked the dynamic libraries properly.
I have using the libxml2 on cygwin and found this problem, which
actually did not have any issues on Linux.

Anyway, the order matters in compiling on cygwin.

Thanks a lot.
Senthil

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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