X-Spam-Check-By: sourceware.org Message-ID: <46D6B81B.4010609@cygwin.com> Date: Thu, 30 Aug 2007 08:29:15 -0400 From: "Larry Hall (Cygwin)" Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070505 Remi/2.0.0.0-3.fc4.remi Thunderbird/2.0.0.0 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: ldconfig problem References: <587d37680708292245t687eb4ban4c512ba6e6f6c566 AT mail DOT gmail DOT com> <587d37680708292247k5bf8a21en423298d5b72cfb67 AT mail DOT gmail DOT com> In-Reply-To: <587d37680708292247k5bf8a21en423298d5b72cfb67@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- 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/