codeblocks for D2 on 64-bit Ubuntu 10.10

Frank fkmiec at
Sat Apr 9 18:43:18 PDT 2011


I am attempting to learn D2 and needed to set up an IDE. From what I
can see, CodeBlocks is the best we have at the moment. I had trouble
getting it set up, so I wanted to share what I've done to make it
work. I'm sure it's not the "right" way, so anyone who knows better,
please chime in.

Go to Settings -> Compiler and Debugger -> Other settings -> Advanced
Options and delete all the linker commands (save them somewhere to be
able to restore later, just in case) and change the compile single
file to object setting to:

$compiler -v $options $includes $file -of$exe_dir/$exe_name

You may also be able to specify dmd as the linker instead of gcc and
have better luck ... I will try that later since I assume there is an
advantage to linking in a separate step.

Also, under Settings -> Search Directories, add:


One last thing ... the command above is building 32-bit. I tested
adding -m64 and it worked fine and built a 64-bit executable. Test by
executing "file {filename}.o" and you'll get output like:

TestD.o: ELF 64-bit LSB relocatable, x86-64, version 1 (GNU/Linux),
not stripped

This seems to work, but as I say, I'm brand new to D ... coming from
Java where everything is dynamically linked and tool support is
excellent. Hope it helps some other newbies.

More information about the Digitalmars-d-ide mailing list