Problem with duplicate symbols when using gfortran 4.6 that are not present when using gfortran 4.5

Arjen Markus arjen.markus895@gmail.com
Sat Nov 12 10:10:00 GMT 2011


Hi Steve,

oops, forgot to mention that: it is Windows XP.

Regards,

Arjen

2011/11/11 Steve Kargl <sgk@troutmask.apl.washington.edu>:
> On Fri, Nov 11, 2011 at 12:19:38PM +0100, Arjen Markus wrote:
>>
>> the problem I am confronted with is a trifle complicated. It occurs in
>> the PLplot project (http://plplot.sf.net).
>> The thing is this:
>> - The Fortran 95 examples in that project can be built without a
>> problem, when using gfortran 4.5, but
>>   when using gfortran 4.6, the linker complains about duplicate
>> symbols, such as __gfortran_getarg_i4.
>> - The FORTRAN 77 examples that are compiled and linked with either
>> compiler version pose no such
>>   problem.
>> - Examining the various libraries and object files that are produced,
>> it turns out that these symbol names
>>   are present in one static and one dynamic library, thus causing the
>> problem. (They are _not_
>>   present in the object files that make that dynamic library, only in
>> the one for the static library, as that
>>   use iargc() and getarg (*))
>> - The problem disappears when I use the option
>> -Wl,--allow-multiple-define (the symbol names even disappear
>>   from the DLL, if I am not mistaken)
>>
>> I will try and concoct a small example, if there should be a need for
>> that. My main goal is to be able
>> to compile and link these examples _without_ any special options. I
>> hope my decription is clear enough.
>>
>
> Which platform(s)?
>
> --
> Steve
>



More information about the Fortran mailing list