Thread overview
undefined reference to `_D5xxxx6yyyyy12__ModuleInfoZ'
Nov 05, 2014
bioinfornatics
Nov 05, 2014
Justin Whear
Nov 05, 2014
Ali Çehreli
Nov 06, 2014
bioinfornatics
November 05, 2014
Dear,

maybe I'm too tired to see my errors or they are a bug. See below

I have this:
.
|-- fasta.d
`-- src
     `-- nicea
         |-- metadata.d
         |-- parser.d
         `-- range.d

when I try to build it:

$ dmd -I./src/  ./fasta.d 2>&1
fasta.o:(.rodata+0x1f8): undefined reference to
`_D5nicea6parser12__ModuleInfoZ'
collect2: error: ld returned 1 exit status
--- errorlevel 1

If I merge all files in one that build!

What is it ?

I tried to minimize the problem with dustmite but it give to me at end an empty file …

thanks
November 05, 2014
On Wed, 05 Nov 2014 23:48:21 +0000, bioinfornatics wrote:

> Dear,
> 
> maybe I'm too tired to see my errors or they are a bug. See below
> 
> I have this:
> .
> |-- fasta.d `-- src
>       `-- nicea
>           |-- metadata.d |-- parser.d `-- range.d
> 
> when I try to build it:
> 
> $ dmd -I./src/  ./fasta.d 2>&1 fasta.o:(.rodata+0x1f8): undefined
> reference to `_D5nicea6parser12__ModuleInfoZ'
> collect2: error: ld returned 1 exit status --- errorlevel 1
> 
> If I merge all files in one that build!
> 
> What is it ?
> 
> I tried to minimize the problem with dustmite but it give to me at end an empty file …
> 
> thanks

You have dmd only building the fasta.d file and the linker doesn't know
where
to find the other objects.  If you've compiled the contents of nicea to a
static library (.a) with -lib, then you need to link that library by
tacking a
`-Llibnicea.a` onto your compilation command.
November 05, 2014
On 11/05/2014 03:48 PM, bioinfornatics wrote:
> Dear,
>
> maybe I'm too tired to see my errors or they are a bug. See below
>
> I have this:
> .
> |-- fasta.d
> `-- src
>       `-- nicea
>           |-- metadata.d
>           |-- parser.d
>           `-- range.d
>
> when I try to build it:
>
> $ dmd -I./src/  ./fasta.d 2>&1

Include all files no the command line:

$ dmd -I./src/  ./fasta.d ./src/nicea/metadata.d ./src/nicea/parser.d ./src/nicea/range.d 2>&1

> fasta.o:(.rodata+0x1f8): undefined reference to
> `_D5nicea6parser12__ModuleInfoZ'
> collect2: error: ld returned 1 exit status
> --- errorlevel 1
>
> If I merge all files in one that build!
>
> What is it ?
>
> I tried to minimize the problem with dustmite but it give to me at end
> an empty file …
>
> thanks

Ali

November 06, 2014
On Wednesday, 5 November 2014 at 23:53:57 UTC, Ali Çehreli wrote:
> On 11/05/2014 03:48 PM, bioinfornatics wrote:
>> Dear,
>>
>> maybe I'm too tired to see my errors or they are a bug. See below
>>
>> I have this:
>> .
>> |-- fasta.d
>> `-- src
>>      `-- nicea
>>          |-- metadata.d
>>          |-- parser.d
>>          `-- range.d
>>
>> when I try to build it:
>>
>> $ dmd -I./src/  ./fasta.d 2>&1
>
> Include all files no the command line:
>
> $ dmd -I./src/  ./fasta.d ./src/nicea/metadata.d ./src/nicea/parser.d ./src/nicea/range.d 2>&1
>
>> fasta.o:(.rodata+0x1f8): undefined reference to
>> `_D5nicea6parser12__ModuleInfoZ'
>> collect2: error: ld returned 1 exit status
>> --- errorlevel 1
>>
>> If I merge all files in one that build!
>>
>> What is it ?
>>
>> I tried to minimize the problem with dustmite but it give to me at end
>> an empty file …
>>
>> thanks
>
> Ali

Oh yes , …

I need to sleep thanks a lot guys