digitalmars.D.learn - Total Newbie Q regarding compiling..
- Chris Warwick (8/8) Mar 07 2007 I've only ever used integrated IDEs before so im a bit bemused as to how...
- Daniel Keep (26/38) Mar 07 2007 a.d:
- Chris Warwick (5/12) Mar 07 2007 So the first file listsed becomes the exe? The second just an object fil...
- Daniel Keep (23/39) Mar 07 2007 Each source or object file you supply to dmd gets linked into the final
- Dejan Lekic (5/5) Mar 08 2007 Mr. Warwick, you can still use IDEs if that is what You prefer, allthoug...
I've only ever used integrated IDEs before so im a bit bemused as to how i get multiple source files to compile into a single exe. I tried dmd + sourcefilename but that always gives me an exe. I have the compiler instaled ok, and i can compile a basic program, if it's just in a single file, do i need a make file or a linker doing somthing or other to build multifile projects?? thanks, chris
Mar 07 2007
Chris Warwick wrote:I've only ever used integrated IDEs before so im a bit bemused as to how i get multiple source files to compile into a single exe. I tried dmd + sourcefilename but that always gives me an exe. I have the compiler instaled ok, and i can compile a basic program, if it's just in a single file, do i need a make file or a linker doing somthing or other to build multifile projects?? thanks, chrisa.d: ---- import b; void main() { hi(); } b.d: ---- import std.stdio; void hi() { writefln("Heeeeere's Johnny!"); } Then compile and run like so:dmd a.d b.d aHeeeeere'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). -- 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/
Mar 07 2007
"Daniel Keep" <daniel.keep.lists gmail.com> wrote in message news:esnu0j$1fah$3 digitalmars.com...Then compile and run like so:So the first file listsed becomes the exe? The second just an object file? And dmd automaticly links them?dmd a.d b.dGreat, bud looks just the thing for me. ;-)aHeeeeere'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).
Mar 07 2007
Chris Warwick wrote:"Daniel Keep" <daniel.keep.lists gmail.com> wrote in message news:esnu0j$1fah$3 digitalmars.com...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.Then compile and run like so:So the first file listsed becomes the exe? The second just an object file? And dmd automaticly links them?dmd a.d b.dThere 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/Great, bud looks just the thing for me. ;-)aHeeeeere'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).
Mar 07 2007
Mr. Warwick, you can still use IDEs if that is what You prefer, allthough I really recommend learning basics of building a native applications (ie. basic of compiling and linking processes). http://www.codeblocks.org is the IDE I use for C/C++/D programming, which I warmly recommend. There is an in-development IDE called eDitor as well. I do not remember the URI, but You can just search for it here, and You'll find it. :) Kind regards Dejan
Mar 08 2007