Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #6295 > unrolled thread
| Started by | ha <Henry_Albrecht@Safe-mail.net> |
|---|---|
| First post | 2016-03-05 01:52 +0100 |
| Last post | 2016-03-09 23:25 +0000 |
| Articles | 13 — 5 participants |
Back to article view | Back to comp.programming
VSE2013: How to reduce exefile-size ? ha <Henry_Albrecht@Safe-mail.net> - 2016-03-05 01:52 +0100
Re: VSE2013: How to reduce exefile-size ? fir <profesor.fir@gmail.com> - 2016-03-05 05:02 -0800
Re: VSE2013: How to reduce exefile-size ? JJ <jj4public@vfemail.net> - 2016-03-06 18:04 +0700
Re: VSE2013: How to reduce exefile-size ? ha <Henry_Albrecht@Safe-mail.net> - 2016-03-07 18:48 +0100
Re: VSE2013: How to reduce exefile-size ? BartC <bc@freeuk.com> - 2016-03-08 12:14 +0000
Re: VSE2013: How to reduce exefile-size ? fir <profesor.fir@gmail.com> - 2016-03-08 13:29 -0800
Re: VSE2013: How to reduce exefile-size ? ha <Henry_Albrecht@Safe-mail.net> - 2016-03-09 07:51 +0100
Re: VSE2013: How to reduce exefile-size ? fir <profesor.fir@gmail.com> - 2016-03-09 13:34 -0800
Re: VSE2013: How to reduce exefile-size ? ha <Henry_Albrecht@Safe-mail.net> - 2016-03-10 00:07 +0100
Re: VSE2013: How to reduce exefile-size ? fir <profesor.fir@gmail.com> - 2016-03-09 15:25 -0800
Re: VSE2013: How to reduce exefile-size ? ha <Henry_Albrecht@Safe-mail.net> - 2016-03-10 01:02 +0100
Re: VSE2013: How to reduce exefile-size ? fir <profesor.fir@gmail.com> - 2016-03-10 07:47 -0800
Re: VSE2013: How to reduce exefile-size ? Richard Heathfield <rjh@cpax.org.uk> - 2016-03-09 23:25 +0000
| From | ha <Henry_Albrecht@Safe-mail.net> |
|---|---|
| Date | 2016-03-05 01:52 +0100 |
| Subject | VSE2013: How to reduce exefile-size ? |
| Message-ID | <nbdakf$85n$1@news.albasani.net> |
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.
[toc] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2016-03-05 05:02 -0800 |
| Message-ID | <ea8482f5-a254-426e-9133-2edcc09feeec@googlegroups.com> |
| In reply to | #6295 |
W dniu sobota, 5 marca 2016 01:52:35 UTC+1 użytkownik ha napisał: > 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
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2016-03-06 18:04 +0700 |
| Message-ID | <1nolm83iobem0$.yrl4fxyi7d4b$.dlg@40tude.net> |
| In reply to | #6295 |
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.
[toc] | [prev] | [next] | [standalone]
| From | ha <Henry_Albrecht@Safe-mail.net> |
|---|---|
| Date | 2016-03-07 18:48 +0100 |
| Message-ID | <nbkeu6$jr$1@news.albasani.net> |
| In reply to | #6297 |
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.
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2016-03-08 12:14 +0000 |
| Message-ID | <nbmfi6$vnd$1@dont-email.me> |
| In reply to | #6295 |
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
[toc] | [prev] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2016-03-08 13:29 -0800 |
| Message-ID | <8c92072a-ccfc-489d-909c-24a2451e47d8@googlegroups.com> |
| In reply to | #6307 |
W dniu wtorek, 8 marca 2016 13:14:58 UTC+1 użytkownik Bart napisał: > 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
[toc] | [prev] | [next] | [standalone]
| From | ha <Henry_Albrecht@Safe-mail.net> |
|---|---|
| Date | 2016-03-09 07:51 +0100 |
| Message-ID | <nboh56$ob2$1@news.albasani.net> |
| In reply to | #6295 |
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.
[toc] | [prev] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2016-03-09 13:34 -0800 |
| Message-ID | <451ef9a9-1ec9-4429-9929-199565ae1ad6@googlegroups.com> |
| In reply to | #6310 |
W dniu środa, 9 marca 2016 07:51:22 UTC+1 użytkownik ha napisał: > 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?)
[toc] | [prev] | [next] | [standalone]
| From | ha <Henry_Albrecht@Safe-mail.net> |
|---|---|
| Date | 2016-03-10 00:07 +0100 |
| Message-ID | <nbqaal$405$1@news.albasani.net> |
| In reply to | #6313 |
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
[toc] | [prev] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2016-03-09 15:25 -0800 |
| Message-ID | <a3b5306d-4200-40a0-b752-a392ee5c6a4b@googlegroups.com> |
| In reply to | #6316 |
W dniu czwartek, 10 marca 2016 00:07:05 UTC+1 użytkownik ha napisał: > 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))
[toc] | [prev] | [next] | [standalone]
| From | ha <Henry_Albrecht@Safe-mail.net> |
|---|---|
| Date | 2016-03-10 01:02 +0100 |
| Message-ID | <nbqdi2$98k$1@news.albasani.net> |
| In reply to | #6317 |
fir <profesor.fir@gmail.com> schrieb:
>> 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
You can create your program in two ways:
link with static runtime libs.
Use either the /MT or the /MTd option to cl.exe. In this case, you will have no dependency on the msvcrt DLL, and therefore you will
not have to redistribute it. In Visual Studio, right click on the Project or Solution, Properties > C/C++->Code Generation->Runtime
library use Multithreaded and Multithreaded debug respectively. This is the easier way. The downside is that the resulting executable
is larger.
link with the dynamic C Runtime library.
You will use either the /MD or the /MDd option to cl.exe.
In Visual Studio, right click on the Project or Solution, Properties > C/C++->Code Generation->Runtime library use Multithreaded
Dynamic Link and Multithreaded Dynamic Link debug respectively. This results in a smaller EXE, but the downside is that you must
install the required MSVCRT when installing your application.
This is from this site:
http://stackoverflow.com/questions/1073509/should-i-redistribute-msvcrt-dll-with-my-application
So this is, what I am talking about.
> 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))
The sourcecode is the same.
[toc] | [prev] | [next] | [standalone]
| From | fir <profesor.fir@gmail.com> |
|---|---|
| Date | 2016-03-10 07:47 -0800 |
| Message-ID | <f9385733-3249-460e-906c-653a0764566c@googlegroups.com> |
| In reply to | #6319 |
W dniu czwartek, 10 marca 2016 01:02:13 UTC+1 użytkownik ha napisał: > fir <profesor.fir@gmail.com> schrieb: > > > >> 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 > > You can create your program in two ways: > > link with static runtime libs. > Use either the /MT or the /MTd option to cl.exe. In this case, you will have no dependency on the msvcrt DLL, and therefore you will > not have to redistribute it. In Visual Studio, right click on the Project or Solution, Properties > C/C++->Code Generation->Runtime > library use Multithreaded and Multithreaded debug respectively. This is the easier way. The downside is that the resulting executable > is larger. > > link with the dynamic C Runtime library. > You will use either the /MD or the /MDd option to cl.exe. > In Visual Studio, right click on the Project or Solution, Properties > C/C++->Code Generation->Runtime library use Multithreaded > Dynamic Link and Multithreaded Dynamic Link debug respectively. This results in a smaller EXE, but the downside is that you must > install the required MSVCRT when installing your application. > > > This is from this site: > http://stackoverflow.com/questions/1073509/should-i-redistribute-msvcrt-dll-with-my-application > > So this is, what I am talking about. > > > > 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)) > > > The sourcecode is the same. alrright, the source of confusion ws you used unusul/wrong naming, now its ok
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2016-03-09 23:25 +0000 |
| Message-ID | <nbqb8e$78d$2@dont-email.me> |
| In reply to | #6316 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming
csiph-web