ivanforum ivanforum
Forum for Iter Vehemens ad Necem
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   fchat fChat   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Big Binary?

 
Post new topic   Reply to topic    ivanforum Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Andy



Joined: 26 Apr 2006
Posts: 4
Location: Alaska

PostPosted: Mon May 01, 2006 11:19 pm    Post subject: Big Binary? Reply with quote

Well, I've finally done it. I've managed to get IVAN to compile consistently and efficiently using mingw through the code::blocks IDE. Turns out it was linking my libraries statically without my knowing it. Now that I've got everything more or less exactly the same as the makefile, the game builds, but the binary is much larger than the stock windows binary (say, about 4.7 megs). I'm not sure why, being that I'm stripping it of all symbols and have debugging turned off, and the only library I'm linking statically is libfelib.a. Anyone have any ideas?

Here's my compile line for felib:

Code:
mingw32-g++.exe -ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -O3 -W -fno-inline -DNDEBUG  -I....MinGWinclude -IFeLibInclude -IC:MinGWinclude  -c
.FeLibSourcewhandler.cpp -o FeLibReleaseFeLibSourcewhandler.o


Here's the linking line for felib:

Code:
ar.exe -r C:Projectsivan-0.50FeLibReleaselibFeLib.a FeLibReleaseFeLibSourcebitmap.o
<...>
FeLibReleaseFeLibSourcewhandler.o
ranlib C:Projectsivan-0.50FeLibReleaselibFeLib.a
ar.exe: creating C:Projectsivan-0.50FeLibReleaselibFeLib.a


Compile line for main:

Code:
windres.exe -i .MainResourceIvan.rc -J rc -o

MainReleaseMainResourceIvan.res -O coff -IMainResource -IC:MinGWinclude
mingw32-g++.exe -ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -O3 -DNDEBUG  -I....MinGWinclude -IFeLibInclude -IMainInclude -IC:MinGWinclude  -c

.MainSourceactset.cpp -o MainReleaseMainSourceactset.o


Linking line for main:

Code:
mingw32-g++.exe -L....MinGWlib -LFeLibRelease -LMainRelease -LC:MinGWlib  -o C:Projectsivan-0.50MainReleaseIvan.exe
MainReleaseMainSourceactset.o MainReleaseMainSourceareaset.o
<...>
MainReleaseMainSourcewskill.o  MainReleaseMainResourceIvan.res   FeLibReleaselibFeLib.a
-lmingw32 -lSDLmain -lSDL  -mwindows


The binary generated from ivanmgw.mak ends up being about 2.9mb. This one ends up being about 4.7mb. The stock version is 1.9mb. Any ideas what's causing this?
_________________
/*What the hell is this?*/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ivanforum Forum Index -> Programming All times are GMT


Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group