Forum Navigation
Trouble installing/compiling on Ubuntu
Posted: 04/05/07 19:22:00Hi there,
I've tried a variety of things, and I'm having difficulty getting anything beyond the supplied stdc.printf hello.d to compile under Tango. For instance, when I try to compile:
import tango.io.Console; void main() { Cout("Hello, World").newline; }with dmd tangoio.d, I get
gcc tangoio.o -o tangoio -m32 -lphobos -lpthread -lm tangoio.o:(.data+0x30): undefined reference to `_D5tango2io7Console12__ModuleInfoZ' tangoio.o: In function `_Dmain': tangoio.d:(.gnu.linkonce.t_Dmain+0x10): undefined reference to `_D5tango2io7Console4CoutC5tango2io7Console7Console6Output' collect2: ld returned 1 exit status --- errorlevel 1or with bud (sudo bud tangoio.d -op)
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libphobos.a(linux.o):(.data+0x4): multiple definition of `FD_SETSIZE' /usr/local/include/tango/stdc/posix/sys/select.o:(.data+0x4): first defined here /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libphobos.a(linux.o):(.data+0xc): multiple definition of `RTLD_NOW' /usr/local/include/tango/stdc/posix/dlfcn.o:(.data+0x4): first defined here /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libphobos.a(linux.o):(.data+0x10): multiple definition of `_SIGSET_NWORDS' /usr/local/include/tango/stdc/posix/signal.o:(.data+0x40): first defined here /usr/local/include/tango/io/Console.o:(.rodata+0x34): undefined reference to `_D6object6Object6toUtf8MFZAa' /usr/local/include/tango/io/Console.o:(.rodata+0x90): undefined reference to `_D6object6Object6toUtf8MFZAa' /usr/local/include/tango/io/Console.o:(.rodata+0x108): undefined reference to `_D6object6Object6toUtf8MFZAa' /usr/local/include/tango/io/Buffer.o:(.rodata+0x100): undefined reference to `_D6object6Object6toUtf8MFZAa' /usr/local/include/tango/io/Buffer.o: In function `_D5tango2io6Buffer6Buffer5errorMFAaZv': /usr/local/include/tango/io/Buffer.d:(.gnu.linkonce.t_D5tango2io6Buffer6Buffer5errorMFAaZv+0xf): undefined reference to `_D5tango4core9Exception11IOException7__ClassZ' /usr/local/include/tango/io/Buffer.d:(.gnu.linkonce.t_D5tango2io6Buffer6Buffer5errorMFAaZv+0x23): undefined reference to `_D5tango4core9Exception11IOException5_ctorMFAaZC5tango4core9Exception11IOException' /usr/local/include/tango/io/DeviceConduit.o:(.rodata+0x74): undefined reference to `_D6object6Object6toUtf8MFZAa' /usr/local/include/tango/io/DeviceConduit.o:(.rodata+0x110): undefined reference to `_D6object6Object6toUtf8MFZAa' /usr/local/include/tango/io/Conduit.o:(.rodata+0x11c): undefined reference to `_D6object6Object6toUtf8MFZAa' /usr/local/include/tango/io/Conduit.o: In function `_D5tango2io7Conduit7Conduit9exceptionFAaZv': /usr/local/include/tango/io/Conduit.d:(.gnu.linkonce.t_D5tango2io7Conduit7Conduit9exceptionFAaZv+0x4): undefined reference to `_D5tango4core9Exception11IOException7__ClassZ' /usr/local/include/tango/io/Conduit.d:(.gnu.linkonce.t_D5tango2io7Conduit7Conduit9exceptionFAaZv+0x18): undefined reference to `_D5tango4core9Exception11IOException5_ctorMFAaZC5tango4core9Exception11IOException' collect2: ld returned 1 exit statusI get very similar errors with GDC. Here's my /etc/dmd.conf:
[Environment] DFLAGS=-I/usr/local/include/ -version=Posix -version=TangoI have tango's libphobos.a and libtango.a in /usr/local/lib, and in /usr/local/include, I have std/, tango/, and object.di
I'm probably missing something obvious, but I'm quite new with linux, so I'm not sure what.
Thanks for your help,
Reiner












