View previous topic :: View next topic |
Author |
Message |
dolby
Joined: 12 Sep 2005 Posts: 4
|
Posted: Mon Sep 12, 2005 9:41 pm Post subject: IDE's |
|
|
I'm just about to start using D and Derelict and I was wondering if you guys using Derelict use any IDE's or debuggers? |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Mon Sep 12, 2005 11:48 pm Post subject: |
|
|
There are not yet any feature complete IDE's for D that I have seen. There's an Eclipse plugin project here at dsource, but there's also a more up-to-date one that has been announced in the d.announce newsgroup through a few versions. There's also an IDE called Elephant out there somewhere, but I haven't heard anything about it in a while.
On Windows, I'm quite content with Crimson Editor + Build. I honestly haven't found the need to use an IDE with D. Using Build Response files, you can compile and run an app with a simple command line: build @[response file name]. I typically set up separate BRFs for different builds (debug, optimized, etc...). An example dbg.brf from a project I'm working on right now (Quake 3 port to D):
Code: |
-cleanup
-Tdist\DQ3_DBG.exe
-link
-debug
-g
-Xderelict
-w
-Isrc
-Iimport
src\dq3\main.d
|
Building this is as simple as: build @dbg. Adding the -run command line switch will cause the app to execute at the end of the build process.
For debuggers, Windbg is probably your best candidate on Windows, or gdb on Linux. I believe you may find that some symbols are missing, or that you can't watch variables or something. Again, this is something I haven't found the need to use. I installed Windbg specifically for debugging D programs, but I've not yet had to. I just can't get over the number of posts on the newsgroups from people saying 'I can't use D without better debugging support', or 'lack of a good debugger is a showstopper for me'. It really amazes me that people are so crippled without a dedicated D debugger. Any time I've needed to drill down to a specific line without help from the compiler (such as with access violations) I've been able to do it in short order with printf (or writefln as the case may be).
I don't know, maybe I'm just odd. I rarely use a debugger with Java either. I suppose people just assume that D is as much a pain to debug as C or C++, which many new D users have experience with. I think if people get past that mental block they'll find they can be quite productive in D without a debugger, and have tools like Windbg to fall back on when they do get stuck. |
|
Back to top |
|
|
404FileNotFound
Joined: 20 Aug 2005 Posts: 18
|
Posted: Tue Sep 13, 2005 3:30 am Post subject: |
|
|
I use jedit, I like it better than those eclipse plugins. |
|
Back to top |
|
|
dolby
Joined: 12 Sep 2005 Posts: 4
|
Posted: Tue Sep 13, 2005 3:32 am Post subject: |
|
|
Cool, thanks for the info - I'm gonna check out crimson editor now...
One question about your build script - why are you telling it to 'ignore' derelict? That is, if I'm reading it correctly...
|
|
Back to top |
|
|
AgentOrange
Joined: 21 Jul 2005 Posts: 61
|
Posted: Tue Sep 13, 2005 4:03 am Post subject: |
|
|
dolby wrote: | Cool, thanks for the info - I'm gonna check out crimson editor now...
One question about your build script - why are you telling it to 'ignore' derelict? That is, if I'm reading it correctly...
|
because hes linking it as a library and telling build not to compile the modules |
|
Back to top |
|
|
Jape
Joined: 09 May 2006 Posts: 1
|
Posted: Tue May 09, 2006 7:43 am Post subject: |
|
|
Theres now IDE available that supports D. (www.codeblocks.org)
Grab latest nightly build and youre good to go.
I havent done any hardcore coding with it because im just learning D, but for my purposes so far, it has been working pretty well.
Only problem is that i havent been able to get derelict working with it yet. (getting loads of Undefined Symbol errors at compile time). And im not competent enough with D compiler/linker/etc yet to start figuring whats wrong with it. |
|
Back to top |
|
|
JoeCoder
Joined: 29 Oct 2005 Posts: 294
|
Posted: Tue May 09, 2006 10:56 pm Post subject: |
|
|
I second Code::Blocks. I first started using it for C++ back in the fall and someone wrote a plugin for D around December. Since then, D support is built right into the compiler (the nightly builds) and I'm quite pleased with it.
I almost never use a debugger either and settle for printf's when I need them. I just wish dmd would tell me where those nasty access violations came from and perhaps a stack trace, like java. Maybe in future versions...
Oh, and I have been able to get Derelict working with it just fine. Have you told Code::Blocks to import the Derelict lib's that you're using? Right click on your project->build options->linker tab and add the libs. Works just like it does for C++. I am working with somewhat of a customized version of Derelict with a few of my own libraries / modifications and a bit of rearranging, but it shouldn't make a difference. |
|
Back to top |
|
|
Crispy
Joined: 26 Nov 2005 Posts: 67
|
Posted: Tue May 09, 2006 11:30 pm Post subject: |
|
|
Cool. Does it use the Build utility for building things? Does that code completion work for D?
I'm currently using my own jury-rigged solution involving Crimson Editor (which actually kinda sucks) and some batch files... it'd be nice to have a proper IDE for a change. |
|
Back to top |
|
|
JoeCoder
Joined: 29 Oct 2005 Posts: 294
|
Posted: Wed May 10, 2006 11:25 pm Post subject: |
|
|
It has limited code completion, but I turned it off rather than mess with it, because it seemed to be wrong more than right. Perhaps more playing with the settings would produce better results. Nonetheless, Code::Blocks is undergoing rapid development right now and is already very nice.
Oh, and there's no requirement for Build. You just add files and libs to your project and it handles all the command line stuff. I used Context before, with a similar make-shift environment, and itis quite a step ahead. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Thu May 11, 2006 4:45 am Post subject: |
|
|
I just don't see any productivity gains in using Code::Blocks over Crimson Editor. I have several macros set up in CE that I use for comment blocks and other boilerplate stuff. CB has no support for macros yet. It's real easy to alt-tab to the console and hit shift-up to run the last command (build, usually), so the one click compilation does nothing for me (I could configure CE to run Build for me, but I'm already used to what I'm doing).
When we get a D IDE that is as feature rich as Eclipse (refactoring, behind-the-scenes compilation, documentation popups, and so on), then I'll have a reason to switch. Hell, I'm even using CE + mingw for the C and C++ work I do. |
|
Back to top |
|
|
kylefurlong
Joined: 16 Nov 2005 Posts: 29
|
Posted: Fri May 12, 2006 2:24 pm Post subject: |
|
|
The Poseidon project here on dsource is an option as well. That said, I use CE + Build as well. |
|
Back to top |
|
|
Zweistein
Joined: 21 Mar 2007 Posts: 19
|
Posted: Fri Jun 29, 2007 1:02 pm Post subject: |
|
|
Quote: | Oh, and I have been able to get Derelict working with it just fine. Have you told Code::Blocks to import the Derelict lib's that you're using? Right click on your project->build options->linker tab and add the libs. Works just like it does for C++. I am working with somewhat of a customized version of Derelict with a few of my own libraries / modifications and a bit of rearranging, but it shouldn't make a difference. |
Hello, I would like to use CodeBlocks with Derelict and D. But i dont get it to work. If i do it the way you did, i get the errors:
C:\DProgramming\dm\bin\..\lib\SDL.lib
Error 43: Not a Valid Library File |
|
Back to top |
|
|
Zweistein
Joined: 21 Mar 2007 Posts: 19
|
Posted: Fri Jun 29, 2007 1:50 pm Post subject: |
|
|
Ok, i got it to work now!
A SMall Tutorial so far: I downloaded Derelict from here: http://dsource.org/projects/derelict
there is a buildme.d inside. When you compile it with dmd:
dmd.exe buildme.d
Then, you get a buildme.exe. When you click on that it generates you some files:
DerelictSDL.lib
DerelictGL.lib
DerelictGLU.lib
DerelictAL.lib
... and so on....
These file, you can just add them by clicking on Project->Build Options->click on your Projectname->Linker Settings->and then you add all the Libraries there by clicking "Add" and choosing all the libs from the derelict/lib directory.
Then it compiles fine. |
|
Back to top |
|
|
JoeCoder
Joined: 29 Oct 2005 Posts: 294
|
Posted: Fri Jun 29, 2007 8:22 pm Post subject: |
|
|
I've since switched from Code::blocks to Descent, and I can honestly say it's been a pleasant experience. Feature support is still somewhat minimal; it does do syntax highlighting and limited error checking (red underlines), but being built on eclipse makes it quite powerful in its own right. |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Fri Jun 29, 2007 9:04 pm Post subject: |
|
|
JoeCoder wrote: | I've since switched from Code::blocks to Descent, and I can honestly say it's been a pleasant experience. Feature support is still somewhat minimal; it does do syntax highlighting and limited error checking (red underlines), but being built on eclipse makes it quite powerful in its own right. |
Does debugging with ddbg work yet? |
|
Back to top |
|
|
|