C++ compiler questions

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
kel
Baaaaaa!
Baaaaaa!
Posts: 2461
Joined: Thu Oct 02, 2003 1:29 pm 0
Location: england

C++ compiler questions

Post by kel »

[Edited the thread title to make it more relevant]

Compiled file sizes: (bit of a ramble)

DeanoC mentioned freeglut in another thread. So I popped on their website downloaded the source and complied the .dll. Out of curiosity I also found a pre-compiled version of the .dll (from Tao – mono). I noticed my .dll was larger than the one that came with Tao (268KB to Taos 236KB). I guessed they could have cut some stuff out that they didn't need, maybe, but I'm not sure. I then found that I could shave 4KB off the .dll size by disabling embed manifest, but I have no idea what this means :D

Anyhoo, it got me thinking. I opened up one of my small simple test programs in a hex viewer, and noticed that Express had embedded the full path to the .pdb file in my release compiled .exe. Rummaging around in the linker/debug options I found an option to turn this off for release, although I wonder why it hadn't been turned off for release by default?

So, are there any other things that I should be aware off that Express may stick into my release .exe that may make it larger than needed? Just to clear things up I'm not going to turn into a KB saving freak, but there's no need to have stuff in there that's not needed.

Thanks.
Last edited by kel on Thu Dec 22, 2005 7:14 pm 0, edited 1 time in total.
User avatar
Snakey
Baaaaaaa!
Baaaaaaa!
Posts: 8938
Joined: Thu May 09, 2002 4:17 pm 0
Location: Hell on Earth

Post by Snakey »

This is pretty old but has a lot of useful info.

http://www.microsoft.com/msj/archive/S572.aspx
Nothing is worth the effort you put into it.
User avatar
kel
Baaaaaa!
Baaaaaa!
Posts: 2461
Joined: Thu Oct 02, 2003 1:29 pm 0
Location: england

Post by kel »

Cheers Snakey, love the title of that article. Interesting read to, although I think I'll just stick to making sure I remove the debug info from a final build.

Couldn't help but try out Dev-C++ today and I was astonished at the difference in final .exe builds from it compared to VC++. Just adding a cout to a Dev-C++ program adds huge amounts of baggage to the final build size.

It's an fascinating subject, although I fear its way out of my depth so I'll just stick to learning C for now :)
StepFather
Baa!
Baa!
Posts: 47
Joined: Sun Oct 30, 2005 5:57 pm 0
Location: SPACE

Post by StepFather »

Snakey wrote:This is pretty old but has a lot of useful info.

http://www.microsoft.com/msj/archive/S572.aspx
Thanx :D
User avatar
piku
Sheepie Whore
Sheepie Whore
Posts: 20960
Joined: Wed Apr 24, 2002 10:44 am 0
Website: Http://Www.ncot.uk
Location: Wakefield
Contact:

Post by piku »

Cool! That may spew henceforth out my dad's printer for later consumption.
return (0);
Post Reply