[Tango] Linker error when using tango.io.file

Timo Gransch timo.gransch at gmx.de
Sat Jul 19 13:02:09 PDT 2008


Hello!

After a couple of months, I wanted to write a small programm using DMD 1.028
and Tango 0.99.6 (Jeff) on Linux. Both were installed using the install
script from the DWT Page (
http://www.dsource.org/projects/dwt/wiki/SetupLinux ). I use CodeBlocks
8,02 as my IDE.

Unfortunately my code fails to compile as soon as I try to use
tango.io.File. 

This sample code compiles fine: 

module test;

import tango.io.Console;
import tango.io.File;

int main()
{
    File f=null;

    Cout ("Test of Tango file functions").newline;

    //f=File("text.txt");

    return 0;
}

But as soon as I uncomment the line "f=File("text.txt");", I get the
following message when linking: 

Compiling: test.d
Linking console executable: bin/Debug/test-tango
/usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/libtango-user-dmd.a(tango.time.Time.o)
(.data._D48TypeInfo_E5tango4time4Time8TimeSpan11__anonymous6__initZ+0x8):
undefined reference to `_D10TypeInfo_l6__initZ'
/usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/libtango-user-dmd.a(tango.time.Time.o)
(.data._D44TypeInfo_E5tango4time4Time4Time11__anonymous6__initZ+0x8):
undefined reference to `_D10TypeInfo_l6__initZ'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

I'm linking with libpthread.a, libm.a, libtango-base-dmd.a and
libtango-user-dmd.a. Am I missing another library?

Best regards and thanks in advance,
Timo


More information about the Digitalmars-d-learn mailing list