digitalmars.D.ide - codeblocks for D2 on 64-bit Ubuntu 10.10
- Frank (25/25) Apr 09 2011 All:
- Daniel Gibson (11/46) Apr 09 2011 Thanks for writing that down (I personally never got CB to really work
- David Wang (48/48) Apr 10 2011 ==================================================
All: 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: /usr/include/d/dmd/druntime /usr/include/d/dmd/phobos 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.
Apr 09 2011
Am 10.04.2011 03:43, schrieb Frank:All: 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: /usr/include/d/dmd/druntime /usr/include/d/dmd/phobos 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.Thanks for writing that down (I personally never got CB to really work with D ;)) However: Codeblocks is *not* the best, it doesn't support D properly, it only sometimes happens to kind of work because D is somewhat similar to C++. On Linux I'd suggest to use Eclipse+DDT instead, see http://code.google.com/a/eclipselabs.org/p/ddt/ When I tested it, autocompletion and "find definition of this" (ctrl-click) worked well. Cheers, - Daniel
Apr 09 2011
================================================== == Forward by Frank (fkmiec gmail.com) == Posted at 2011/04/09 21:43 to digitalmars.D.ide All: 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: /usr/include/d/dmd/druntime /usr/include/d/dmd/phobos 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. ================================================== For settings or CodeBlocks about the D program build, please view the instructions: For Windows: http://wiki.codeblocks.org/index.php? title=Installing_a_supported_compiler#Digital_Mars_D_Compiler_for_W indows For Linux: http://wiki.codeblocks.org/index.php? title=Installing_a_supported_compiler#Digital_Mars_D_Compiler_for_L inux
Apr 10 2011