Solved

Shared DLL vs Statically linked library

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

831 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