Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 20th, 2005, 12:04 PM   #1
ian
Newbie
 
Join Date: Feb 2005
Location: Singapore
Posts: 13
Rep Power: 0 ian is on a distinguished road
Newbie Question: C++ .EXEs.

Everybody starts off as a newbie, don't they? Okay, I'm new to C++ (syntax is somewhat familiar, due to my experiences in Java and some other languages) and desperate to get the hang of it because I'm going on a competition in 5 days time * .

Now, I need to ask is there anyway, I can reduce the size of C++'s .EXEs? Let me explain, the competition allows only a single diskette (that's 1.38 Mb) for participants to submit six EXE programs. The problem comes in when I import libraries.

For example, all of the programs would definitely need to do some basic file IO (open, read, close, create, write, close, in that order). So when I include fstream, the EXE size will increase approximately by 120 Kb. Assuming that each program is 200 Kb, it'll fit nicely into the diskette.

The whole thing that's bothering me is this: what if I'd need to import another library? I won't have an clues on what the tasks I'm supposed to do until the actual day of competition itself.

So I'd need anyone who's experience in C++ to help me out a little, is there anyway I can reduce the size of the EXEs? Or is there a workaround so the file size won't be as big.

The compiler I will be using is DJGPP (latest version; I downloaded it for the sake of the competition 2 days ago).

Thanks for any help you'd give.

* Just in case you're interested, I wasn't supposed to go for this competition because I lacked knowledge in C++ and Pascal (if they accepted Java, I wouldn't have worries already). My teacher-in-charge, however, submitted my name and told me that she did 8 days before the competition. So I'm kind of in a panic and desperate state now.
ian is offline   Reply With Quote
Old Feb 20th, 2005, 12:10 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
That's nice of her. Anyway, you could try UPX:

http://upx.sourceforge.net/
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 20th, 2005, 12:25 PM   #3
ian
Newbie
 
Join Date: Feb 2005
Location: Singapore
Posts: 13
Rep Power: 0 ian is on a distinguished road
Quote:
Originally Posted by Ooble
That's nice of her. Anyway, you could try UPX:

http://upx.sourceforge.net/
Sorry Ooble, I can't bring in any other digital stuff (except calculators and watches) so bringing in a external program would not be possible (they provide you will the computers, compliers and all the stuff one would need).

Thanks for the link though, looks interesting!
ian is offline   Reply With Quote
Old Feb 20th, 2005, 1:16 PM   #4
Floppie
Newbie
 
Join Date: Feb 2005
Posts: 18
Rep Power: 0 Floppie is on a distinguished road
I assume simply bringing the files in zipped wouldn't work? It's not an external program, as long as the computers you're working with either run Windows XP or have some sort of program already installed to deal with *.zip files.
Floppie is offline   Reply With Quote
Old Feb 20th, 2005, 6:57 PM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
It's not external software. You just run your application through it and it compresses it. You can't even tell it's decompressing when you run it.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 21st, 2005, 5:41 AM   #6
drewlander
Newbie
 
drewlander's Avatar
 
Join Date: Jan 2005
Location: Pittsburgh, PA
Posts: 16
Rep Power: 0 drewlander is on a distinguished road
Send a message via AIM to drewlander
If you want small .exe's right off the bat, this site may help
http://www.hailstorm.net/papers/smallwin32.htm
*Edit, I apologize, but I did not check your compiler until AFTER I posted *smacks forehead*
maybe this link will help http://download.mirror.ac.uk/sites/w...q/faq8_14.html
__________________
On and on....

Last edited by drewlander; Feb 21st, 2005 at 5:43 AM.
drewlander is offline   Reply With Quote
Old Feb 21st, 2005, 8:20 AM   #7
ian
Newbie
 
Join Date: Feb 2005
Location: Singapore
Posts: 13
Rep Power: 0 ian is on a distinguished road
Quote:
Originally Posted by Floppie
I assume simply bringing the files in zipped wouldn't work? It's not an external program, as long as the computers you're working with either run Windows XP or have some sort of program already installed to deal with *.zip files.
Quote:
Originally Posted by Ooble
It's not external software. You just run your application through it and it compresses it. You can't even tell it's decompressing when you run it.
I can't bring anything in; we leave our bags outside. We are required to access whatever is on the computer they're providing.
Quote:
Originally Posted by drewlander
*Edit, I apologize, but I did not check your compiler until AFTER I posted *smacks forehead*
maybe this link will help http://download.mirror.ac.uk/sites/w...q/faq8_14.html
Thank you so much for the link!!! :p
ian is offline   Reply With Quote
Old Feb 21st, 2005, 1:47 PM   #8
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Run your application through it before you go in then.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 21st, 2005, 4:44 PM   #9
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Last time i entered one of those types of competitions they simply allowed us to keep submitting programs one t at a time, wipe the disk and then put a new one on there. I'm sure the competition is more interested in your ability to program the programs than the ability to put 6 of them on a single disk... don't worry about it too much man.
__________________

tempest is offline   Reply With Quote
Old Feb 22nd, 2005, 4:15 AM   #10
Berto
Programming Guru
 
Join Date: Aug 2004
Posts: 1,022
Rep Power: 6 Berto is on a distinguished road
Send a message via AIM to Berto Send a message via MSN to Berto
complain that in this day and age you should be able to use cdrw's?
Berto is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:55 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC