[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with cross build for windows on linux with shared libraries
From: |
Tomasz Gajewski |
Subject: |
Re: Problem with cross build for windows on linux with shared libraries |
Date: |
Thu, 5 Sep 2013 10:22:36 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > From: Tomasz Gajewski <tomga <at> wp.pl>
> > Date: Thu, 5 Sep 2013 08:36:10 +0000 (UTC)
> >
> > I'm experimenting with build for windows using mingw cross compiler. During
> > build I get link error during linking psktool.exe due to missing symbol
> > rpl_localtime.
>
> Symbols of the form rpl_FUNC usually come from gnulib replacements.
> So this symbol should have been resolved by linking against gnulib.
> The link command you show:
>
> > libtool: link: i686-pc-mingw32-gcc -std=gnu99 -g -O2 -o .libs/psktool.exe
> > psk.o ../lib/.libs/libgnutls.dll.a
-L/home/tomga/external/mxe/usr/i686-pc-mingw32/lib -lz
> -lhogweed -lnettle
/home/tomga/external/mxe/usr/i686-pc-mingw32/lib/libgmp.dll.a -lcrypt32
> ./.libs/libcmd-psk.a ../gl/.libs/libgnu.a
> /home/tomga/external/mxe/usr/i686-pc-mingw32/lib/libiconv.dll.a -lws2_32
> ../src/libopts/.libs/libopts.a
> /home/tomga/external/mxe/usr/i686-pc-mingw32/lib/libpcreposix.dll.a
> /home/tomga/external/mxe/usr/i686-pc-mingw32/lib/libpcre.dll.a
-L/home/tomga/external/mxe/usr/i686-pc-mingw32/lib
>
> already links against gnulib, see ../gl/.libs/libgnu.a above. So the
> problem seems to be that gnulib is mentioned on the link command line
> _before_ libopts.a. Re-arranging the order of the libraries so that
> libgnu.a is after libopts.a should fix the problem.
>
> Actually, I think libiconv and -lws2_32 should also be closer to the
> end of the link command line.
I've checked that changing sequence of libopts.la and libgnu.la allows
linking this binary. I was building all dependencies as shared libraries so
I haven't expected any static archives there and problems coming from using
them. Thank you.
Regards
Tomasz Gajewski