-
October 15th, 2004, 11:39 AM
#1
Junior Member
Huge Programs With VC++
I'm having a problem with VC++,
every time i compile a program even the smallest one i end up with a 100 KB or more !!!!
any solution ?
One Man\'s Villain, is another man\'s HERO
-
October 15th, 2004, 11:41 AM
#2
did you alter any of the settings? like including libraries or so?
-
October 17th, 2004, 04:48 PM
#3
Junior Member
no i did'nt ulter anything i just installed and compiled !
One Man\'s Villain, is another man\'s HERO
-
October 17th, 2004, 04:58 PM
#4
No big issue...
As in my picture... I have a tiny program, simply prints out "Hello world!" but the dependency on libraries and using namespace dumps a lot of data into the .exe... see http://home.arcor.de/e-h-s/tips/minexe/minexe.html for more references.
-
October 17th, 2004, 08:52 PM
#5
try this code:
Code:
#include <stdio.h>
int main(void)
{
printf("Hello World!");
return 0;
}
this will give a normal sized program.
i don't know why it is that big with your code, i have tried altering it, but it still stays big 400+ kb.
but i'm not a C++ coder, i just know C, and the above code is C, the only advantage is that you can use it in a cpp file also.
-
October 22nd, 2004, 11:16 AM
#6
Junior Member
well i think this is just one of microsoft's problems !
i should use another compiler
One Man\'s Villain, is another man\'s HERO
-
October 22nd, 2004, 11:32 AM
#7
well i think this is just one of microsoft's problems !
That's not an explanation - compiling lepricauns code
I get a executable of 40kb using VC++.
Adding 10 somewhat complex statements,
I get an executable of 41kb. Both sizes are reasonable.
It's not just one of microsoft's problems. However,
I never actually tried to minimize the size of executables
(I just know that option: "optimize for ... minimal size",
and therefore cannot help you. sorry.
/edit:
switching to another compiler might not help you much.
I tried on a linux machine with gcc the above example:
-rwxr-xr-x 1 abcdefgh abcd 515K Oct 22 12:54 prog*
If the only tool you have is a hammer, you tend to see every problem as a nail.
(Abraham Maslow, Psychologist, 1908-70)
-
October 24th, 2004, 12:50 PM
#8
Junior Member
ok
any way i'm using now DEV_CPP it is very good and it is compiling every C & C++ Code I'm giving it !
One Man\'s Villain, is another man\'s HERO
-
October 24th, 2004, 07:48 PM
#9
VC++ usually compiles a Debug build that includes a lot of bloat. Compile a Release build and it would strip a lot of the debugging info out and probably make a smaller executable.
Although I do remember my VC++ making huge 200KB+ executables for Hellow World. Which is why I liked DevC++ better. Cheers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|