C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-30-2003, 03:51 PM   #1
Registered User
 
Join Date: Oct 2003
Posts: 2
Creating a Stand-Alone Application

I have been programming with Qt (a C++ class library used to create GUIs) for over 6 months now, and I am nearing completion of a project for my company. The code is complete, and my final goal in this project is to make the GUI a stand-alone application. I have had a great deal of trouble trying to learn exactly how this is done under Microsoft Visual C++.

Basically, all I want to do is to get this app to run on any Windows machine so the end user doesn't need all the .dlls. How do I go about doing this? Do I need to create a static library for the application and link it to that, or is there a way to have just the .exe run on its own (stand-alone style)?

I don't think knowledge of Qt is necessary. It is only one of the few .dlls I need to link to the application. The following is a list of my system information and programming environment:

-Windows 98
-MS VC++
-*MOCing through moc.exe (using DOS to create the MOC files)

Any information concerning this problem would be greatly appreciated. Thanks!

-Bob Leonard
QtApprentice is offline   Reply With Quote
Old 10-30-2003, 04:44 PM   #2
Guest
 
Sebastiani's Avatar
 
Join Date: Aug 2001
Posts: 4,923
The DLL's *must* be present in order for your app to run. The only other way out would be to write or aquire a utility that converts one to a static lib. Structurally, a dll is identical to an exe (a single bit differentiates the two). Thus, an exe-to-lib utility would work equally well (provided one even exists, of course).
Sebastiani is offline   Reply With Quote
Old 11-03-2003, 10:57 AM   #3
Registered User
 
Join Date: Oct 2003
Posts: 2
More Info..

I apologise for the confusion, but I am NOT using .dlls. Actually, I have the static libraries (.lib) for my 3rd party classes. With this in mind, how would I go about creating a stand-alone .exe in MS VC++? Thanks for the help and response!

-Bob
QtApprentice is offline   Reply With Quote
Old 11-03-2003, 12:25 PM   #4
Anti-Poster
 
Join Date: Feb 2002
Posts: 1,212
I admit that I don't know much about this, but I think it has to do with the __declspec(dllexport) and __declspec(dllimport) calls that tells it to link dynamically instead of statically. I did this once several years ago, but I don't remember much.
__________________
Rule #1: Every rule has exceptions

Traveller's Dilemma Contest Site - Results posted!
pianorain is offline   Reply With Quote
Old 11-03-2003, 01:33 PM   #5
Magically delicious
 
LuckY's Avatar
 
Join Date: Oct 2001
Posts: 856
It depends on the version of MSVC you have. Is it professional or enterprise edition? If so, set the project to "Using MFC in a static library" instead of "Using MFC in a shared DLL" (or of course if you aren't using MFC you'd choose "Not using MFC").

hth
LuckY is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Profiler Valgrind afflictedd2 C++ Programming 4 07-18-2008 09:38 AM
creating an application Cpro C++ Programming 21 05-30-2008 12:21 AM
Problem with com application amardon C++ Programming 3 10-06-2005 05:50 AM
Creating a Dialog Based Application without MFC MitchellH C++ Programming 8 05-21-2005 10:02 AM


All times are GMT -6. The time now is 08:16 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22