X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: =?ISO-8859-1?Q?Ren=E9_Berber?= Subject: Re: libuuid Date: Tue, 09 Oct 2007 21:00:23 -0500 Lines: 47 Message-ID: References: <3ee066b40710091803y70650c8fu82fbe824d1604dc6 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <3ee066b40710091803y70650c8fu82fbe824d1604dc6@mail.gmail.com> OpenPGP: url=hkp://wwwkeys.pgp.net X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Antony Baxter wrote: > I'm trying to compile a PostgreSQL module that relies on libuuid. I've > found a number of previous discussions about this lib on the mailing > list which indicate that in general we must use the Win32api version > libuuid.a found in /usr/lib/w32api >=20 > The source of the module can be found here: >=20 > http://code.google.com/p/polarrose-postgresql-uuid/ >=20 > and the output of make is: >=20 > gcc -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Winline > -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing > -I. -I/usr/include/postgresql/server -I/usr/include/postgresql/internal > -c -o uuid.o uuid.c ... > dlltool --export-all --output-def uuid.def uuid.o >=20 > dllwrap -o uuid.dll --def uuid.def uuid.o > /usr/lib/postgresql/pgxs/src/makefiles/../../src/utils/dllinit.o > -L/usr/lib -lpostgres > uuid.o:uuid.c:(.text+0xe): undefined reference to `_uuid_compare' ... > I've tried: >=20 > dllwrap -o uuid.dll --def uuid.def uuid.o > /usr/lib/postgresql/pgxs/src/makefiles/../../src/utils/dllinit.o > -L/usr/lib -lpostgres -L/usr/lib/w32api -luuid Try: dllwrap -o uuid.dll --def uuid.def uuid.o /usr/lib/postgresql/pgxs/src/makefiles/../../src/utils/dllinit.o -L/usr/lib -lpostgres -Wl,-Bstatic -luuid -Wl,-Bdynamic I don't think you need the -L/usr/lib/w32api but maybe you do, and the chan= ge can also be written as -Wl,-Bstatic,-luuid,-Bdynamic . Explanation: libuuid.a is a static library, you have to explicitly link it otherwise the tools look only for dynamic libraries. --=20 Ren=E9 Berber -- 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/