Link to home
Start Free TrialLog in
Avatar of billyh
billyh

asked on

DLL Problem.

I have writen a Windows Application, works well and stuff but I have a problem when it runs. Every time I install the application on a machine without Visual C++, it tells me this stuff about MFC "dll" files. How can I make it work without it requiring the DLLs'.
Avatar of Triskelion
Triskelion
Flag of United States of America image

Technique 1.
Find the DLLs it wants and copy them onto the target machine with the other DLLs.

Technique 2.
Change your project to have MFC static link.
This will remove the need to keep up with the DLLs, but make your EXE a little larger.

I always use static link.
Avatar of naveenkohli
naveenkohli

Two optins...
1. Copy the required DLLs to the machine
2. When you compile your application, link the MFC dlls statically. But this will make your executable file huge.
Avatar of billyh

ASKER

Thanx Triskelion technique 2 seems like the choice for me, only one thing, how do I link the DLLs statically before I compile my project.

Answer this and the points are yours.
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The DLLs are not what is acutally linked.  LIB files (contain mostly the same information as the DLLs) are statically linked.  The compiler will find them automatically if you have your IDE or environment settings configured properly.  Follow the suggestion made by thui and it'll work.
if the option to statically link is not there, then it's because you don't have professional or enterprise edition of vc and you'll be stuck lugging the dlls around.
Avatar of billyh

ASKER

Sorry for the long delay, but you suggestion has definitly helped me.

Thanx