News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

DMD and GDC (D language compilers) enabled under Linux

Started by aarti_pl, March 26, 2006, 02:46:15 PM

Previous topic - Next topic

aarti_pl

Hello!

I posted yesterday a patch which enables under linux two compilers which are also available there.
https://developer.berlios.de/patch/?func=detailpatch&patch_id=956&group_id=5358
DMD compiler is tested and works good. I didn't try GDC, but it should work as well, as this compiler was already prepared for linux - it was just disabled.

I had only one problem with libraries - I had to add:
m_LinkLibs.Add(_("-lpthread"));
m_LinkLibs.Add(_("-lm"));

please notice -l option, which is hardcoded, but should be added from:
m_Switches.linkLibs = _T("-l");
m_Switches.libPrefix = _T("lib");
m_Switches.libExtension = _T("a");

It should, but it isn't... Anyone could comment why it doesn't work?

Best Regards
Aarti_pl

Zingam

If you know how to enable DMD, do you have any idea how to enable the generation of debug info? Currently the switches do not cause the generation of debug info. Well not exactly. In fact the problem is that the debug info is added during the link process.

Here is some more info: http://forums.next.codeblocks.org/index.php?topic=2476.0

JThedering

I've tried the GDC compiler (v0.17), which works very well too. Here even the debugger is usable (I just tried to set breakpoints, looked into local variables and into classes) if you have patched gdb for D support(http://dsource.org/projects/gdb-patches/).
With DMD (v0.154) I couldn't make the debug symbols begin put in, so debugging doesn't work.
Maybe interesting: If I use GDC through the DMD command line wrapper (gdmd) debugging doesn't work either.

I had to change the linker command for DMD from
$linker -o $exe_output $link_options $link_objects $libs
to
$linker -of$exe_output $link_options $link_objects $libs
to make linking work with DMD (no problems with GDC).

I hope this patch will be in svn soon, C::B seems really usable as a D Linux IDE with it, if it was more stable.

afb