View previous topic :: View next topic |
Author |
Message |
Fileburner
Joined: 28 Apr 2009 Posts: 11
|
Posted: Sat May 02, 2009 6:56 pm Post subject: A Beginner QuestionS |
|
|
Hello everyone,
I am a beginner in D programming language and also in compiled languages, I used to program in java and .net and I have some questions that I need answers for if you please.
1- I downloaded tango+tangobos 0.99.7+dmd 1.033 and dwt 3.4.1, do I need to compile (or do something to) these libaries so I can use them ?
2- however I started some simple console/gui programs, the console ones compile and run perfect, but when I tried a gui program using DWT it compiles fine but I can't launch the .exe file by double click but I can launch it from console have I missed something here ? is there a different process to follow in order to compile a GUI application ?
3- what is a .lib file what is used for ? do I need .lib file to compile or only libraries's source files ?
4- when I compile, the compilator take a long time (about 30s on C2D 3.2Ghz) and generates about 270 .obj file, do have to wait everytime I compile that long ? is there anyway to avoid this long compile time ?moreover it generate a .exe file of 1.8Mb of size however the source file is only 109 line. is this normal !!??
Please answer at anyone you can.
Thank you in advance. |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Sat May 02, 2009 9:45 pm Post subject: |
|
|
1. Check the Digital Mars and Tango sites, where there are some instructions. Tango has a build step, but you shouldn't have to do any of that by hand. You will modify DMD's configuration just slightly, though.
http://digitalmars.com/d/1.0/dmd-windows.html
http://dsource.org/projects/tango/wiki/TopicInstallTango
http://dsource.org/projects/dwt/wiki/Installation
You'll probably want to look at DSSS:
http://dsource.org/projects/dsss
2. Technically there's no difference, or at least not anything that should cause what you're describing... There's a flag for compiling specifically for GUI, but all it really does is prevent a console coming up. Honestly, I've forgotten what it is since I rarely use it. ^_^
3. A .lib file is a static linking library... which is basically just a bunch of pre-compiled object files lumped together to make compiling and linking faster. You don't really need it if you have the sources, but it is good to have them for the speedup. Sometimes.
4. You consider 30 seconds a long time?? I remember compiles that took overnight... Seriously, that isn't all that long really. But, it may be that its compiling all the library code you're using as well, which is where those .lib files are nice.
As for the size, yes that's a little big, but its from the library code that's getting pulled in, which is more-or-less a constant cost. All additional filesize growth will be only from your own program. Plus, I have a few programs laying around here which are a hundred times that size, or bigger. And those aren't even written in D. Its really pretty normal. _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
Fileburner
Joined: 28 Apr 2009 Posts: 11
|
Posted: Wed May 06, 2009 12:27 pm Post subject: |
|
|
thank you very much, your answers made clair many things in my head ^^ really appreciated. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|