473,320 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Windows library Size

I am using
Expand|Select|Wrap|Line Numbers
  1. #include <vector>
  2. #include <map>
  3.  
In my c++ project, and these 2 header files are included in almost 200 .cpp files and when i build a static library for the whole project in linux its size is around 10MB and when i did the same thing in windows its size is almost over 80MB, and one thing i noticed was both vector and map combinely takes 500KB in each .cpp file in windows. I am building the static library in windows using release mode.
I am using VS 2007. Can any one help me out whether anything is wrong in my flow, or anyway to reduce the library size.
Sep 30 '13 #1
2 1457
The compile options i am using,

%VCLIB% /c /W0 /Ox /EHsc /GR /D "NDEBUG" /D "_WIN32_" /MD /I%PT_INC% /I%CPP_INC% %SRC%\*.cpp
Sep 30 '13 #2
weaknessforcats
9,208 Expert Mod 8TB
The size of a header file is irrelevant. Header files are declarations only and there should be nothing in a header file that generates any code.

Each .cpp must compile on its own. So your 200 object files are linked into one .lib. There should be no reason why a Windows lib should be 8 times the size of a Linux lib unless you have compiled using a debug build.

BTW: Why a lib and not a dll?
Sep 30 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: relisoft | last post by:
Seattle, WA -- Seattle-based Reliable Software® announces the release their Windows Library into the public domain. Reliable Software Windows Library, RSWL, is the foundation for their compact,...
175
by: Sai Hertz And Control Systems | last post by:
Dear all, Their was a huge rore about MySQL recently for something in java functions now theirs one more http://www.mysql.com/doc/en/News-5.0.x.html Does this concern anyone. What I...
2
by: Wayne | last post by:
I have found from experience and from posts to the group that a change to the Windows font size under Display Properties often trashes the appearance of forms in Access. Is there a way to...
2
by: VMI | last post by:
How can I change the size of the forms in my Windows application when the screen resolution the user has is higher than the one I developed the application in? I have a customer that has a screen...
5
by: Karam Chand | last post by:
Hello Thanks for all the reponses yesterday for my queries regarding moving from MySQL to PgSQL. As I see there is no native port of POstgresql for Windows. My applications is being developed...
95
by: hstagni | last post by:
Where can I find a library to created text-based windows applications? Im looking for a library that can make windows and buttons inside console.. Many old apps were make like this, i guess ...
1
by: cprpandian | last post by:
Hi Can anyone tell The maximum Size of File in Windows in C , please
3
by: Ignoramus3627 | last post by:
We have a library that has 179385 lines of code. With GCC, no debug information requested (no -g option) it creates a 31 meg long .a library file. I think that it is excessive. Any idea what I...
11
by: richi | last post by:
Hi everyone, I am sorry, my english is not good! I found a problem about memory. In a function I malloced more memory than before that is 4.5625Kb in theory. Then I watched the memory size of...
1
rhitam30111985
by: rhitam30111985 | last post by:
Hi all , I am using a Compaq presario c700 notebook PC with windows vista(32 bit) . the specs are as follows : Intel Dual cpu t2370 1.73 ghz 2 GB ram Now i am having this strange...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.