|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.windows.32-bits - dmc executables larger?
Hello,
I've looking into DMC and getting a feel for it as well as the
free Visual C++ compiler. I haven't tested anything big yet,
but it seems for small programs the exe file sizes produced by
DMC are larger then the ones produced by the visual c++ compiler.
Can anyone explain this? I have also noticed that the obj files
are oppisite in relation. DMC produces smaller OBJ files. Does
this have something to do with the way that I am linking?
Here are a few examples.
---hello.cpp---
#include <windows.h>
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Hello World!", "Hello", MB_OK);
return 0;
}
---end hello.cpp---
cl hello.cpp user32.lib produces exe filesize = 22,528 B
dmc hello.cpp user32.lib produces exe filesize = 30,236 B
That seems like quite a difference for such a small program.
I've also been going through the opengl tutorials at
nehe.gamedev.net and the same results apply.
For example lesson2:
cl lesson2.cpp opengl32.lib glu32.lib user32.lib gdi32.lib exe filesize =
40,960
dmc lesson2.cpp opengl32.lib glu32.lib user32.lib gdi32.lib exe filesize =
46,620
Just trying to figure out what is going on. Thanks
Kalon
May 26 2004
Kalon Mills schrieb...I've looking into DMC and getting a feel for it as well as the free Visual C++ compiler. I haven't tested anything big yet, but it seems for small programs the exe file sizes produced by DMC are larger then the ones produced by the visual c++ compiler. Can anyone explain this? I have also noticed that the obj files are oppisite in relation. DMC produces smaller OBJ files. Does this have something to do with the way that I am linking? Jun 04 2004
"Heinz Saathoff" <hsaat despammed.com> wrote in message news:MPG.1b2a4239e3494c729896df news.digitalmars.com...Kalon Mills schrieb...I've looking into DMC and getting a feel for it as well as the free Visual C++ compiler. I haven't tested anything big yet, but it seems for small programs the exe file sizes produced by DMC are larger then the ones produced by the visual c++ compiler. Can anyone explain this? I have also noticed that the obj files are oppisite in relation. DMC produces smaller OBJ files. Does this have something to do with the way that I am linking? Jun 04 2004
|