Jump to page: 1 2
Thread overview
Using MSDEV to *compile* AND *debug* D programs.
May 24, 2004
Regan Heath
May 24, 2004
Billy Zelsnack
May 24, 2004
Kris
May 24, 2004
Regan Heath
May 24, 2004
Andy Friesen
May 25, 2004
Stephen Waits
May 25, 2004
Andy Friesen
May 24, 2004
Billy Zelsnack
May 25, 2004
davepermen
May 25, 2004
Regan Heath
May 26, 2004
davepermen
May 26, 2004
Regan Heath
May 28, 2004
davepermen
May 24, 2004
Hi,

I have managed to get MSDEV to compile and debug my D programs (thanks to Arcane Jill for the idea)

Here is what I did:

1. create an MSDEV "Utility" project - these are like normal projects but they do not do the link step.

2. add your .d source files to this project. (all of them).

3. edit project settings, expand list on left, for each source file define the following "Custom Build" settings:

[Commands]
D:\D\dmd\bin\dmd.exe -c "$(InputPath)" -g -gt -debug -c -od"$(IntDir)"

[Output]
$(IntDir)\$(InputName).obj

[as this is the same for all source files, it'd be great if I could define it for all somewhere instead of having to define it for each and every file]

4. edit project settings, click project name at top of tree on left, in the post-build section add the command

d:\D\dmd\bin\dmd.exe -g "$(IntDir)\*.obj" -of"$(OutDir)\main.exe"

and that's it. Hit compile and it should create a Debug/Release dir with the .obj and .exe file in it. Put a breakpoint in and press Run and you're debugging (assuming you're in debug mode)

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
May 24, 2004
I make a utility project also, but I just add a custom tool bound to F8 that calls make.exe in the right directory. This way I just need to add the file to the workspace and the makefile.

My makefile is also simplified. I found that compiling was significantly faster if I just put everything on the same command line and called dmd.exe once. This makes sense because the compiler doesn't have to constantly do the same work over and over again. Right now my project takes about 0 seconds to compile and that rocks. The only problem with this method is sometimes the compiler errors are not much help because they don't tell you what file a problem occurred in.

Personally I think that the old school 'compile a single file at a time' concept is outdated. If your compiler is fast enough, then why not compile the entire project every time. This becomes more true in the future as projects size grow slowly while computer speed just gets crazy. This is not plausible in c++ right now (or for quite awhile), but it definitely is in D.


Regan Heath wrote:
> Hi,
> 
> I have managed to get MSDEV to compile and debug my D programs (thanks to Arcane Jill for the idea)
> 
> Here is what I did:
> 
> 1. create an MSDEV "Utility" project - these are like normal projects but they do not do the link step.
> 
> 2. add your .d source files to this project. (all of them).
> 
> 3. edit project settings, expand list on left, for each source file define the following "Custom Build" settings:
> 
> [Commands]
> D:\D\dmd\bin\dmd.exe -c "$(InputPath)" -g -gt -debug -c -od"$(IntDir)"
> 
> [Output]
> $(IntDir)\$(InputName).obj
> 
> [as this is the same for all source files, it'd be great if I could define it for all somewhere instead of having to define it for each and every file]
> 
> 4. edit project settings, click project name at top of tree on left, in the post-build section add the command
> 
> d:\D\dmd\bin\dmd.exe -g "$(IntDir)\*.obj" -of"$(OutDir)\main.exe"
> 
> and that's it. Hit compile and it should create a Debug/Release dir with the .obj and .exe file in it. Put a breakpoint in and press Run and you're debugging (assuming you're in debug mode)
> 
May 24, 2004
Wholeheartedly agreed;

Mango.* has ~75 files/800KB. All are compiled together as you describe, which takes about 1.5 seconds, debug-mode, on an old P3-866. That's one of the great things about D -- the compiler is so eff'ing fast ...

- Kris


"Billy Zelsnack" <billy_zelsnack@yahoo.com> wrote in message news:c8sv9r$2edh$1@digitaldaemon.com...
>
> I make a utility project also, but I just add a custom tool bound to F8 that calls make.exe in the right directory. This way I just need to add the file to the workspace and the makefile.
>
> My makefile is also simplified. I found that compiling was significantly faster if I just put everything on the same command line and called dmd.exe once. This makes sense because the compiler doesn't have to constantly do the same work over and over again. Right now my project takes about 0 seconds to compile and that rocks. The only problem with this method is sometimes the compiler errors are not much help because they don't tell you what file a problem occurred in.
>
> Personally I think that the old school 'compile a single file at a time' concept is outdated. If your compiler is fast enough, then why not compile the entire project every time. This becomes more true in the future as projects size grow slowly while computer speed just gets crazy. This is not plausible in c++ right now (or for quite awhile), but it definitely is in D.
>


May 24, 2004
Despite the speed it is still in-eficient to recompile everything all the time.
If the object file is up to date, why compile it again?

But hey, who cares, do it whatever way you like I say. :)

On Mon, 24 May 2004 08:21:38 -0700, Kris <someidiot@earthlink.dot.dot.dot.net> wrote:

> Wholeheartedly agreed;
>
> Mango.* has ~75 files/800KB. All are compiled together as you describe,
> which takes about 1.5 seconds, debug-mode, on an old P3-866. That's one of
> the great things about D -- the compiler is so eff'ing fast ...
>
> - Kris
>
>
> "Billy Zelsnack" <billy_zelsnack@yahoo.com> wrote in message
> news:c8sv9r$2edh$1@digitaldaemon.com...
>>
>> I make a utility project also, but I just add a custom tool bound to F8
>> that calls make.exe in the right directory. This way I just need to add
>> the file to the workspace and the makefile.
>>
>> My makefile is also simplified. I found that compiling was significantly
>> faster if I just put everything on the same command line and called
>> dmd.exe once. This makes sense because the compiler doesn't have to
>> constantly do the same work over and over again. Right now my project
>> takes about 0 seconds to compile and that rocks. The only problem with
>> this method is sometimes the compiler errors are not much help because
>> they don't tell you what file a problem occurred in.
>>
>> Personally I think that the old school 'compile a single file at a time'
>> concept is outdated. If your compiler is fast enough, then why not
>> compile the entire project every time. This becomes more true in the
>> future as projects size grow slowly while computer speed just gets
>> crazy. This is not plausible in c++ right now (or for quite awhile), but
>> it definitely is in D.
>>
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
May 24, 2004
Regan Heath wrote:
> Despite the speed it is still in-eficient to recompile everything all the time.
> If the object file is up to date, why compile it again?

The Mozilla people would agree with you. (it's my understanding that the Mozilla source is bigger than the Windows NT source)

I compile one at a time because that's how SCons works by default.  I'm sure it could be adjusted, but that would take precious effort that could be spent elsewhere. :)

 -- andy
May 24, 2004
I like it because it is just one less thing to worry about. I have been bitten many times by not having objects up to date and chasing around false bugs that disappeared on a full build.


Regan Heath wrote:
> Despite the speed it is still in-eficient to recompile everything all the time.
> If the object file is up to date, why compile it again?
> 
> But hey, who cares, do it whatever way you like I say. :)

May 25, 2004
Andy Friesen wrote:
> I compile one at a time because that's how SCons works by default.  I'm 

Ahh SCons :)

Does SCons know about D (dmd or dfront) by default now?

Thanks,
Steve
May 25, 2004
Stephen Waits wrote:

> Andy Friesen wrote:
> 
>> I compile one at a time because that's how SCons works by default.  I'm 
> 
> Ahh SCons :)
> 
> Does SCons know about D (dmd or dfront) by default now?

Yessir.  As of version 0.95, it's standard fare.

http://www.scons.org/

 -- andy
May 25, 2004
possibly we can simply replace the c++ compiler of vc6 with dmd, and get it to work again then? with the right compiler flags.. needs some hacking, possibly even of the exe (to change the default flags), but that doesn't mather. i can co-install vc6 and vc.net 2003, and don't need vc6 for c++ at all anyways.. so it could get abused instead:D

then again, i'm simply waiting to get leds on windows.... one day..

one day....

till then, i continue with c++, writing platform independent web, and mail servers for my fancy homepage, all with sdl and sdl_net and freeimage (yeah, i'm coming from gamedev, and i stay there:D)

"Regan Heath" <regan@netwin.co.nz> schrieb im Newsbeitrag news:opr8hezx1z5a2sq9@digitalmars.com...
> Hi,
>
> I have managed to get MSDEV to compile and debug my D programs (thanks to
> Arcane Jill for the idea)
>
> Here is what I did:
>
> 1. create an MSDEV "Utility" project - these are like normal projects but they do not do the link step.
>
> 2. add your .d source files to this project. (all of them).
>
> 3. edit project settings, expand list on left, for each source file define the following "Custom Build" settings:
>
> [Commands]
> D:\D\dmd\bin\dmd.exe -c "$(InputPath)" -g -gt -debug -c -od"$(IntDir)"
>
> [Output]
> $(IntDir)\$(InputName).obj
>
> [as this is the same for all source files, it'd be great if I could define it for all somewhere instead of having to define it for each and every file]
>
> 4. edit project settings, click project name at top of tree on left, in the post-build section add the command
>
> d:\D\dmd\bin\dmd.exe -g "$(IntDir)\*.obj" -of"$(OutDir)\main.exe"
>
> and that's it. Hit compile and it should create a Debug/Release dir with the .obj and .exe file in it. Put a breakpoint in and press Run and you're debugging (assuming you're in debug mode)
>
> -- 
> Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/


May 25, 2004
On Tue, 25 May 2004 23:23:42 +0200, davepermen <davepermen@hotmail.com> wrote:
> possibly we can simply replace the c++ compiler of vc6 with dmd, and get it to work again then? with the right compiler flags.. needs some hacking,
> possibly even of the exe (to change the default flags), but that doesn't
> mather. i can co-install vc6 and vc.net 2003, and don't need vc6 for c++ at all anyways.. so it could get abused instead:D

Let me know how you get on.

> then again, i'm simply waiting to get leds on windows....
> one day..
> one day....

Have you tried DIDE?
http://www.atari-soldiers.com/dide.html

> till then, i continue with c++, writing platform independent web, and mail servers for my fancy homepage, all with sdl and sdl_net and freeimage (yeah, i'm coming from gamedev, and i stay there:D)
>
> "Regan Heath" <regan@netwin.co.nz> schrieb im Newsbeitrag
> news:opr8hezx1z5a2sq9@digitalmars.com...
>> Hi,
>>
>> I have managed to get MSDEV to compile and debug my D programs (thanks to
>> Arcane Jill for the idea)
>>
>> Here is what I did:
>>
>> 1. create an MSDEV "Utility" project - these are like normal projects but
>> they do not do the link step.
>>
>> 2. add your .d source files to this project. (all of them).
>>
>> 3. edit project settings, expand list on left, for each source file define
>> the following "Custom Build" settings:
>>
>> [Commands]
>> D:\D\dmd\bin\dmd.exe -c "$(InputPath)" -g -gt -debug -c -od"$(IntDir)"
>>
>> [Output]
>> $(IntDir)\$(InputName).obj
>>
>> [as this is the same for all source files, it'd be great if I could define
>> it for all somewhere instead of having to define it for each and every
>> file]
>>
>> 4. edit project settings, click project name at top of tree on left, in
>> the post-build section add the command
>>
>> d:\D\dmd\bin\dmd.exe -g "$(IntDir)\*.obj" -of"$(OutDir)\main.exe"
>>
>> and that's it. Hit compile and it should create a Debug/Release dir with
>> the .obj and .exe file in it. Put a breakpoint in and press Run and you're
>> debugging (assuming you're in debug mode)
>>
>> --
>> Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
« First   ‹ Prev
1 2