This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: libuuid
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
>
> The source of the module can be found here:
>
> http://code.google.com/p/polarrose-postgresql-uuid/
>
> and the output of make is:
>
> 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
>
> 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:
>
> 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 change
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.
--
René 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/