User forums > Help
[D Programming] Using Codeblocks with Tango
afb:
--- Quote from: doctor_vitus on May 23, 2007, 11:02:11 pm ---I'm pretty astonished. I reinstalled the binary version of Tango and tried to compile my project with only libtango.a again some a couple of minutes ago, and now it worked, after it had always failed before (with my self compiled tango library). And even the debugger works now!
--- End quote ---
There are two libraries called "tango", one is a component of the runtime - another all modules.
I think they renamed the part of the runtime to something else, in order to avoid confusion...
But it would explain why it would fail before, and why it would work now (like you'd expect)
For practical purposes, I only use two libraries with Tango: "libgphobos.a" and "libgtango.a"
Where the second is optional when using Rebuild, as it will pick up the sources if left out.
Great that it works now, though. If you have any other bugs or suggestions, do post them too.
Vladsharp:
I need some help on using tango...
I'm a gentoo user (gcc-4.2.0, dmd-bin 1.014, tango 0.98)
This is the problem I'm trying to compile:
--- Code: ---import tango.io.Console;
alias char[] String;
void main(String[] args)
{
Cout("Hello, world!").newline;
}
--- End code ---
When I do "dmd hello.d" the program compiles and runs fine.
The following output is produced:
--- Code: ---gcc hello.o -o hello -m32 -Xlinker /opt/dmd/lib/libtango.a -Xlinker -L/opt/dmd/bin/../lib -lphobos -lpthread -lm
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
--- End code ---
Now, Codeblock doesn't want to play nice with it...
After some time of playing with it, all I can get is:
--- Code: ----------------- Build: Debug in TestingProject ---------------
Linking console executable: bin/Debug/TestingProject
obj/Debug/hello.o:(.data+0x30): undefined reference to `_D5tango2io7Console12__ModuleInfoZ'
obj/Debug/hello.o: In function `_Dmain':
/root/projects/TestingProject/hello.d:8: undefined reference to `_D5tango2io7Console4CoutC5tango2io7Console7Console6Output'
/root/projects/TestingProject/hello.d:9: undefined reference to `_D5tango2io7Console4CoutC5tango2io7Console7Console6Output'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
collect2: ld returned 1 exit status
--- End code ---
I have a feeling it's a matter of doing something basic right, but please - it's quite frustrating not to be able to use codeblocks to compile. Thanks for your help :)
Auria:
--- Quote ----lphobos
--- End quote ---
You're still linking against phobos
Vladsharp:
--- Quote from: Auria on May 25, 2007, 01:15:18 am ---
--- Quote ----lphobos
--- End quote ---
You're still linking against phobos
--- End quote ---
I realise that, but that's what dmd does (I've posted its output from the CLI above) - and since the program runs fine, what do you suggest?
afb:
--- Quote from: Auria on May 25, 2007, 01:15:18 am ---
--- Quote ----lphobos
--- End quote ---
You're still linking against phobos
--- End quote ---
Tango also has a replacement library called "libphobos.a", because that name is hardcoded within DMD.
--- Quote from: Vladsharp on May 25, 2007, 07:54:08 am ---I realise that, but that's what dmd does (I've posted its output from the CLI above) - and since the program runs fine, what do you suggest?
--- End quote ---
It seems that your command-line call to DMD is linking in libtango.a, but that Code::Blocks does not ?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version