Link error with template struct on 2.042
Frank Fischer
frank-fischer at shadow-soft.de
Wed Mar 31 02:49:38 PDT 2010
On 2010-03-31, Regan Heath <regan at netmail.co.nz> wrote:
> Frank Fischer wrote:
>> If I compile the above example with
>>
>> dmd main.d
>
> Weird, that command line works fine for me, no errors.
>
Strange. I used the linux version 2.042, just downloaded.
> It is either implementing a function, or not calling one - sometimes
> debug mode will enable extra functions, I note the above undefined
> reference is to a symbol called MyMod.assert being called from
> MyStruct.opAssign.
>
> Was that a complete code sample?
Yes, exactly those two files. Nothing more, nothing less. The example
also works if I put the struct in the file main.d.
Frank
More information about the Digitalmars-d-learn
mailing list