Solved

Shared DLL vs Statically linked library

Posted on 1998-10-13
3
216 Views
Last Modified: 2013-11-20
I created a new project a couple of days ago, and after working on it for these three days, the .exe is already a meg and a half. This isn't normal for me to have an exe this big (never had an eve that big...), and the only thing I did different this time, was I used statically linked libraries instead of using MFC as a shared DLL. Would this be it, and if so, how do I change it in the middle of the project to that damned exe is smaller? I don't wanna re-write all that code, and I'm sure there must be a way to change it.

-Dex Man
0
Comment
Question by:Dex_Man
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
bculver earned 50 total points
ID: 1323275
This is probably due to building the .exe file as a debug version. Try rebuilding as a release version and compare the file sizes. If not, your project can be changed by manually modifying the code. The easiest way is to create two new  projects one as shared and one as static and compare the two for the differences.

0
 

Expert Comment

by:Amaresh080997
ID: 1323276
It could be due to the static linking. Go to project-settings, in the "general" tab, look at the first combobox, labelled "Microsoft Foundation Classes". Click this it will show you the option of making it a shared DLL. Now, rebuild your project. Since it is a shared DLL now, you will need to ship the microsoft dlls (like mfc42d.dll etc), when you ship your executable. Make sure your shipping version is built in release mode, so that the size of the executable is even smaller.
0
 
LVL 1

Author Comment

by:Dex_Man
ID: 1323277
Excellent. Between the answer and the comment, I got all the info I needed!

Thanks!

-Dex Man
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 72
Detect CR LF to each line 12 185
NotAlone Challenge 20 93
c++  placing data into a form and an editbox 5 48
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question