?
Solved

How do i compile an application where it will include all the libraries and be able to run on any computer?

Posted on 2005-03-08
3
Medium Priority
?
228 Views
Last Modified: 2013-11-25
I've written a program in MFC.  As of now, the workspace probably has 19 .cpp files and an example of the libraries i have included are below:

#include "stdafx.h"
#include "piggy.h" //user defined
#include "Login_In.h" //user defined
#include "MainMenu.h" //user defined
#include "pickQuestions.h" //user defined

#include "New_User.h" //user defined
#include "User.h" //user defined
#include "QandA.h" //userdefined

#include "wininet.h"
#include "winnt.h"

#include <fstream>
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string>
#include <vector>
#include <cstring>

I've try to run the executable on my friend's computer but it gives him errors saying he needed the MFC something (?).
He suggested that I do a static compile, which would tack all the libraries right into the program (making the executable very large, but im not too worried about the size)...and he said something about the MFC drivers?

Anyways, I got kind of confused at that point.  All I know for sure is that right now, this program is only executing on my computer.  Any help would be oh so greatly appreciate on how i can get this program to work anywhere!
0
Comment
Question by:chinese_bunny
[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 4

Accepted Solution

by:
sgvill earned 1400 total points
ID: 13486367
In your Project Settings, Under the general tab, select "Use MFC in a static library".  

Steve
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 600 total points
ID: 13486554
Apart from the option to link MFC statically, are you sure you're doing a *release* build?

See also http://msdn.microsoft.com/library/en-us/vccore/html/vcoriRedistributingMFCATLOLEDBTemplatesApplications.asp ("Redistributing MFC, ATL, and OLE DB Templates Applications"). You'll also find this file as "redist.wri" on yout VC++ CD-ROM.
0
 

Author Comment

by:chinese_bunny
ID: 13486722
Thank you very much for both your comments. :)
they are very helpful. <3333
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

765 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