Solved

Shared DLL vs Statically linked library

Posted on 1998-10-13
3
217 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

622 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