This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Gcc multiple definition of `g_utf8_skip


On Tue, Sep 10, 2013 at 7:53 PM, Thomas Dineen <tdineen@ix.netcom.com> wrote:
>
>      I was able to build the new version of the mxe cross environment
> (gcc Cross Compiler To Windows).
>
>     When I build my application I get the following error shown below:
>
> "multiple definition of `g_utf8_skip'"
>
>      Since it appears to be a conflict between two libraries within the mxe
> environment
> I was wondering if any of you had any ideas of how to fix it?
>
>      Is there a way to tell gcc to favor the symbol from one library versus
> the other?
>
> libidn.a(nfkc.o) <=> (libglib_2_0_la-gutf8.o)
>
>      Please respond. I have never seen this kind of error before and I could
> use your help.
>
> Thomas Dineen
>
> /home/tdineen/Projects/Mxe_Cross_Environment_092013/mxe/usr/i686-pc-mingw32/lib/libidn.a(nfkc.o):nfkc.c:(.rdata+0x14900):
> multiple definition of `g_utf8_skip'
> /home/tdineen/Projects/Mxe_Cross_Environment_092013/mxe/usr/i686-pc-mingw32/lib/libglib-2.0.a(libglib_2_0_la-gutf8.o):gutf8.c:(.rdata+0x198):
> first defined here
> collect2: error: ld returned 1 exit status
> make: *** [TA_Benchc] Error 1


First let me say that this is a linker question more than a GCC
question.

Both of these objects are in archives (.a files).  You didn't provide
the command line, but I'll assume that you are not using
--whole-archive or other unusual options.  In that case, these objects
must be defining multiple symbols, and they must be being pulled into
your link because of the symbols other than g_utf8_skip.  It is after
they are both pulled into the link that the conflict arises.  In that
case there is unfortunately nothing you can do, other than fixing the
problem at the source, in the libraries you are using.

Ian


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