This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cannot compile UUID module


Alexander Stadler wrote:

> gcc -c   -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing
> -pipe -I/
> usr/local/include -DUSEIMPORTLIB -O3   -DVERSION=\"0.02\"
> -DXS_VERSION=\"0.02\"
>  "-I/usr/lib/perl5/5.10/i686-cygwin/CORE"   UUID.c
> rm -f blib/arch/auto/UUID/UUID.dll
> g++  --shared  -Wl,--enable-auto-import -Wl,--export-all-symbols
> -Wl,--stack,838
> 8608 -Wl,--enable-auto-image-base -L/usr/local/lib -L/usr/lib/e2fsprogs
> -Wl,-Bst
> atic -luuid -Wl,-Bdynamic UUID.o  -o blib/arch/auto/UUID/UUID.dll       \
>           /usr/lib/perl5/5.10/i686-cygwin/CORE/libperl.dll.a    \
> 
> UUID.o:UUID.c:(.text+0xe): undefined reference to `_uuid_generate'

The ordering here is wrong.  -luuid must come after UUID.o on the
command line if the linker is to resolve uuid_* symbols in UUID.o from
the -luuid library.

With standard autoconf this is achieved by the convention that -l
arguments must go in LIBS not LDFLAGS.  I don't know if the perl system
uses the same convention, but whatever it uses, the -luuid argument does
not belong where it's currently being set.

Brian

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]