[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.programming

VSE2013: How to reduce exefile-size ?

ha

3/5/2016 12:53:00 AM

Hi

My programming language is c and cpp.

The system is Win7 Ultimate 64 Bit.


I am working with VisualStudioExpress 2013 and OpenWatcom.


The same sourcefile results with watcom in a much more smaller exefile-size
than VSE.

Is there a sort of "strip"-option, like "-s" in the gnu-compiler, for VSE ?

I tried all things, that are available via the VSE-GUI. But without success.


12 Answers

kenobi

3/5/2016 1:02:00 PM

0

W dniu sobota, 5 marca 2016 01:52:35 UTC+1 uzytkownik ha napisal:
> Hi
>
> My programming language is c and cpp.
>
> The system is Win7 Ultimate 64 Bit.
>
>
> I am working with VisualStudioExpress 2013 and OpenWatcom.
>
>
> The same sourcefile results with watcom in a much more smaller exefile-size
> than VSE.
>
> Is there a sort of "strip"-option, like "-s" in the gnu-compiler, for VSE ?
>
> I tried all things, that are available via the VSE-GUI. But without success.

for sure it is\it must be compile for size\strip debug symbols\strip some startup code - those things, im not using VS at all so i cant answer directly which switches

JJ

3/6/2016 11:05:00 AM

0

On Sat, 5 Mar 2016 01:52:31 +0100, ha wrote:
> Hi
>
> My programming language is c and cpp.
>
> The system is Win7 Ultimate 64 Bit.
>
> I am working with VisualStudioExpress 2013 and OpenWatcom.
>
> The same sourcefile results with watcom in a much more smaller exefile-size
> than VSE.
>
> Is there a sort of "strip"-option, like "-s" in the gnu-compiler, for VSE ?
>
> I tried all things, that are available via the VSE-GUI. But without success.

If you're using a third party library, perhaps you've chosen the wrong one.
i.e. designed for an all-in-one solution library although you actually need
only a few functions/features of it.

ha

3/7/2016 5:49:00 PM

0

JJ <jj4public@vfemail.net> schrieb:


> If you're using a third party library, perhaps you've chosen the wrong one.
> i.e. designed for an all-in-one solution library although you actually need
> only a few functions/features of it.


No, I am using the default-configuration. It only links
the needed stuff.


Bartc

3/8/2016 12:15:00 PM

0

On 05/03/2016 00:52, ha wrote:
> Hi
>
> My programming language is c and cpp.
>
> The system is Win7 Ultimate 64 Bit.
>
>
> I am working with VisualStudioExpress 2013 and OpenWatcom.
>
>
> The same sourcefile results with watcom in a much more smaller exefile-size
> than VSE.

How much smaller? Some compilers can just generate smaller code than others.

> Is there a sort of "strip"-option, like "-s" in the gnu-compiler, for VSE ?
>
> I tried all things, that are available via the VSE-GUI. But without success.

Try a utility such as PEDUMP or DUMPPE to look inside the executables,
and see what one includes that the other doesn't.

Maybe one statically includes a library, but the other only links to it
dynamically.

--
Bartc



kenobi

3/8/2016 9:30:00 PM

0

W dniu wtorek, 8 marca 2016 13:14:58 UTC+1 uzytkownik Bart napisal:
> On 05/03/2016 00:52, ha wrote:
> > Hi
> >
> > My programming language is c and cpp.
> >
> > The system is Win7 Ultimate 64 Bit.
> >
> >
> > I am working with VisualStudioExpress 2013 and OpenWatcom.
> >
> >
> > The same sourcefile results with watcom in a much more smaller exefile-size
> > than VSE.
>
> How much smaller? Some compilers can just generate smaller code than others.
>
> > Is there a sort of "strip"-option, like "-s" in the gnu-compiler, for VSE ?
> >
> > I tried all things, that are available via the VSE-GUI. But without success.
>
> Try a utility such as PEDUMP or DUMPPE to look inside the executables,
> and see what one includes that the other doesn't.
>
> Maybe one statically includes a library, but the other only links to it
> dynamically.
>
small halloworld exe should be afair of the size of 5kB or 10kB, stripped one (crt startup removed) more like 1KB

ha

3/9/2016 6:51:00 AM

0


Thank you all, for answering


I forgot to say, that I disabled the c-runtime-lib in VSE.

*With* the CRT the resulted filesizes are even better than the ones, created
with watcom.


But I don't want to use the CRT in every case.

So the vse-sizes are more than almost three times big as the watcom-sizes.

Maybe, by switching off the crt, VSE uses without any cleverness all possible stuff,
so that the answer from "jj" gives the hint.



kenobi

3/9/2016 9:35:00 PM

0

W dniu sroda, 9 marca 2016 07:51:22 UTC+1 uzytkownik ha napisal:
> Thank you all, for answering
>
>
> I forgot to say, that I disabled the c-runtime-lib in VSE.
>
> *With* the CRT the resulted filesizes are even better than the ones, created
> with watcom.
>
>
> But I don't want to use the CRT in every case.
>
> So the vse-sizes are more than almost three times big as the watcom-sizes.
>
> Maybe, by switching off the crt, VSE uses without any cleverness all possible stuff,
> so that the answer from "jj" gives the hint.

and what are the sizes (wit and without?)
i may say your post sound a bit lunatic;
for exampel are you sure that programming without crt is so easy (im not sure but does not most of things need that?)


ha

3/9/2016 11:07:00 PM

0

fir <profesor.fir@gmail.com> schrieb:


>> Maybe, by switching off the crt, VSE uses without any cleverness all possible stuff,
>> so that the answer from "jj" gives the hint.
>
> and what are the sizes (wit and without?)
> i may say your post sound a bit lunatic;

lunatic?

> for exampel are you sure that programming without crt is so easy (im not sure but does not most of things need that?)

You can choose. If you switch off crt, the linker will add the needed things automatically.

I fear, you have no idea, what crt means ? And so you say, my question is
lunatic?

on every machine, where an program which is set to "use crt" is used, you have to install that crt.

Without that, the program runs on every machine, whether it has crt installed or not.

keyword: Visual C++ Redistributable Packages für Visual Studio 2013



kenobi

3/9/2016 11:25:00 PM

0

W dniu czwartek, 10 marca 2016 00:07:05 UTC+1 uzytkownik ha napisal:
> fir <profesor.fir@gmail.com> schrieb:
>
>
> >> Maybe, by switching off the crt, VSE uses without any cleverness all possible stuff,
> >> so that the answer from "jj" gives the hint.
> >
> > and what are the sizes (wit and without?)
> > i may say your post sound a bit lunatic;
>
> lunatic?
>
> > for exampel are you sure that programming without crt is so easy (im not sure but does not most of things need that?)
>
> You can choose. If you switch off crt, the linker will add the needed things automatically.
>
> I fear, you have no idea, what crt means ? And so you say, my question is
> lunatic?
>
> on every machine, where an program which is set to "use crt" is used, you have to install that crt.
>
> Without that, the program runs on every machine, whether it has crt installed or not.
>
> keyword: Visual C++ Redistributable Packages für Visual Studio 2013

i think we both are talking of msvcrt.dll (or equivalent)
but you seem to talking about static linking of such crt
as 'disabling' crt - which (if so) is confusing and thus not
proper i think

by switching-off/removing/disabling crt i personally mean
removing the crt from the exe (in gcc like -nostdlib is doing
that, c coding without that may be a bit harder (though probably not so much anyway))

Richard Heathfield

3/9/2016 11:26:00 PM

0

On 09/03/16 23:07, ha wrote:
> fir <profesor.fir@gmail.com> schrieb:
>
>
>>> Maybe, by switching off the crt, VSE uses without any cleverness all possible stuff,
>>> so that the answer from "jj" gives the hint.
>>
>> and what are the sizes (wit and without?)
>> i may say your post sound a bit lunatic;
>
> lunatic?

Pay him no mind. There's at least one like him in every newsgroup.

--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within