Re: [LAD] G++ trouble

From: Will J Godfrey <WillGodfrey@email-addr-hidden>
Date: Mon Nov 16 2020 - 17:01:01 EET

On Mon, 16 Nov 2020 14:52:53 +0100
Alexandre DENIS <contact@alexandredenis.net> wrote:

>On Mon, 16 Nov 2020 13:38:01 +0000
>Will J Godfrey <WillGodfrey@musically.me.uk> wrote:
>
>> Not wishing to hijack this thread but I'm still confused :(
>>
>> I just did a search of the whole of src. It's *used* about a dozen
>> times across 5 otherwise unrelated .cpp files, but is only defined
>> here. Just to be certain, I did a make clean before trying this
>> again, and it's definitely saying multiple defs
>>
>> e.g
>> /usr/bin/ld:
>> CMakeFiles/yoshimi.dir/UI/WidgetMWSlider.cpp.o:(.rodata+0x0):
>> multiple definition of `ADD_COLOUR';
>> CMakeFiles/yoshimi.dir/Interface/InterChange.cpp.o:(.rodata+0x1840):
>> first defined here
>>
>> This happens at the linker stage.
>>
>> Also, I thought the whole idea of putting things like this in a
>> #ifndef/#def block was to ensure it was only set once.
>>
>
>It is only set once *per file* which includes the header. But since the
>symbol is extern, the linker sees one public copy per file, which
>conflict with each other.
>
>-a.
>
Thanks. Clear now. Some reorganisation needed :(

-- 
It wasn't me! (Well actually, it probably was)
... the hard part is not dodging what life throws at you,
but trying to catch the good bits.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Nov 17 04:15:02 2020

This archive was generated by hypermail 2.1.8 : Tue Nov 17 2020 - 04:15:02 EET