Total Newbie Q regarding compiling..
Daniel Keep
daniel.keep.lists at gmail.com
Wed Mar 7 19:26:35 PST 2007
Chris Warwick wrote:
> "Daniel Keep" <daniel.keep.lists at gmail.com> wrote in message
> news:esnu0j$1fah$3 at digitalmars.com...
>> Then compile and run like so:
>>
>>> dmd a.d b.d
>
> So the first file listsed becomes the exe? The second just an object file?
> And dmd automaticly links them?
Each source or object file you supply to dmd gets linked into the final
output. The default output filename is derived from the first file you
pass to it.
In this case, it produces an executable because one of those source
files has a "main" function in it. If you omit the main function, you
get a library.
You can also override what the output file is called as well as what
*kind* out output is created with various compiler switches; can't think
of them off the top of my head. Just run 'dmd' with no arguments for a
list.
>>> a
>> Heeeeere's Johnny!
>>
>> There are also several tools that will simplify this for you. The most
>> used seem to be bud (www.dsource.org/projects/build) and rebuild
>> (http://www.dsource.org/projects/dsss/wiki/Rebuild).
>
> Great, bud looks just the thing for me. ;-)
There are also a growing number of IDEs that support D. Off the top of
my head, there's Code::Blocks and Descent. There's a list of D support
for editors you can look at here:
http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport
An IDE is nice, but it never hurts to understand what's going on under
all those shiny buttons :)
-- Daniel
--
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.
v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
More information about the Digitalmars-d-learn
mailing list