Compiling with VS.NET 2005

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Compiling with VS.NET 2005

Post by Guitarm » 2005-11-20 17:17

I managed to compile latest CVS with VS.NET 2005 today and found the size of the Release exe to be somewhat big.

2003 = 1164 KB
2005 = 2256 KB

Not very optimized, at least not in size.
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2005-11-21 02:25

Hmm, I will check the size of mine when I get home today.
You are comparing binarys you have compilied yourself and not against a DC++ release one which have been compressed with UPX?
You did not accidently compile with a static link to the runtime instead of a dynamic one?

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-11-21 03:03

joakim_tosteberg wrote:You are comparing binarys you have compilied yourself and not against a DC++ release one which have been compressed with UPX?
No, compiled both myself from latest CVS code in 2003 (STLPort 4.6.2, wtl75_5160) and 2005 (STLPort 5.0 RC6, wtl75_5249)
joakim_tosteberg wrote:You did not accidently compile with a static link to the runtime instead of a dynamic one?
I'm not sure what you mean by this...can you explain a bit more? (I haven't changed the default configuration of the project if that's what you mean)
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

Carraya
Posts: 112
Joined: 2004-09-21 11:43

Post by Carraya » 2005-11-21 03:57

There's lots of different stuff in the project files that can make a difference in size, mostly the optimization for size, fast and so on... And I guess you made new project files, so that is probably why...
<random funny comment>

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-11-21 10:21

joakim_tosteberg wrote: a DC++ release one which have been compressed with UPX?
The official DC++ releases are not UPX compressed, so if it is, Guitarm did it himself.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2005-11-21 10:52

GargoyleMT wrote:
joakim_tosteberg wrote: a DC++ release one which have been compressed with UPX?
The official DC++ releases are not UPX compressed, so if it is, Guitarm did it himself.
This changelog entry made me thought they where, but then I was wrong.

Code: Select all

* Added a switch to ease the life of the UPX compressor (exe compressors suck btw) (thanks garg)

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-11-21 11:36

joakim_tosteberg wrote:This changelog entry made me thought they where, but then I was wrong.
Exe compressors do suck, which was why arne doesn't do it. However a number of DC++ derived clients do, and since it was just a command line switch for the linker, putting the patch in DC++ made a good deal of sense. (to me)

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-11-21 11:58

Just a clarification. I do not use UPX compression of the exe's. They're just plain Release compiled one's from latest CVS.
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2005-11-21 13:37

2,2 MB is about the size my release DCPlusPlus.exe has when compiled with vs 2005 aswell, as I currently not have vs 2003 installed I can't compare the sizes.
I'm currently enabling some size optimization parameters to see if that makes any difference in size.
But one thing that I can think of that could make the difference in size is that with the new STLPort at least I have to compile the STLPort library first and that the library then imported makes it bigget than if it as before just could include the files and compile everything without the need for an libray to import.

Edit: I was able to get it down to about 1400 KB by optimizing more for size than for speed.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-11-21 14:22

joakim_tosteberg wrote:But one thing that I can think of that could make the difference in size is that with the new STLPort at least I have to compile the STLPort library first and that the library then imported makes it bigget than if it as before just could include the files and compile everything without the need for an libray to import.
I didn't compile it. I just diffe'd the 4.6.2 config with the 5.0 config and made the latter the same as the former. Can you explain what you mean by compiling it?

/Regards
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2005-11-21 14:41

Guitarm wrote:
joakim_tosteberg wrote:But one thing that I can think of that could make the difference in size is that with the new STLPort at least I have to compile the STLPort library first and that the library then imported makes it bigget than if it as before just could include the files and compile everything without the need for an libray to import.
I didn't compile it. I just diffe'd the 4.6.2 config with the 5.0 config and made the latter the same as the former. Can you explain what you mean by compiling it?

/Regards
Hmm, I didn't get it to link correctly if I used the same configuration in the stlport config, but I did it manually so I might have missed something.
You can compile STLPort to get STLPort library files by entering the build/lib subdirectory in STLPort and using microsoft's commandline compiler (or some other).

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2005-11-22 05:58

joakim_tosteberg wrote:You can compile STLPort to get STLPort library files by entering the build/lib subdirectory in STLPort and using microsoft's commandline compiler (or some other).
I see, yes, I did that too (nmake). But if you carefully fix the config file (there's some negation changes in there) and then remove references to MANIFEST (I actually renamed the whole .rc file). I had to make some (ugly) hacks to WTL aswell (Just commented out a ASSERT in atlapp.h (468)) for example.

With this it (at least) compiled and I was able to start it.
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2005-11-22 15:21

Guitarm wrote:
joakim_tosteberg wrote:You can compile STLPort to get STLPort library files by entering the build/lib subdirectory in STLPort and using microsoft's commandline compiler (or some other).
I see, yes, I did that too (nmake). But if you carefully fix the config file (there's some negation changes in there) and then remove references to MANIFEST (I actually renamed the whole .rc file). I had to make some (ugly) hacks to WTL aswell (Just commented out a ASSERT in atlapp.h (468)) for example.

With this it (at least) compiled and I was able to start it.
Okey, I think I'll stick to the way I have it, seems much less painful :P

Locked