C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

static lib link size

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
mel olonsky
Guest





PostPosted: Tue Dec 26, 2006 10:10 am    Post subject: static lib link size Reply with quote



Hi,

I have a very small HelloWorld application.
Then I need one class from a huge vector calculation
static library.

void main()
{
cout >> "hello";
CVector myvec;
myvec.Set(25,25,0);
myvec.GetAngle();
}


The result is a 1MB exe because the vector lib is really huge.
But shouldn't the linker be smart enough to just link the required
code instead of blowing up my application??

I generated a mapfile and see that it contains a lot of unused static
lib
functions.
Is there a way to force the linker to not add all this unused stuff.
Is this a matter of include files? As soon as I include a header file
the linker will link-in all content of this file.
Or where is the logic about this?

I'm using VS.Net 2003

I need your help
Please give me some hints
-Mel
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) 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, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.