Link to home
Start Free TrialLog in
Avatar of jribble
jribble

asked on

Creating a DLL that uses MFC

I have never created a DLL before.  I am using MSVC++ 6.0.  I would like to create a new DLL that uses MFC.  What is the best way to do this.  I have tried creating a Win32 DDL and it is not obvious to me how I enable MFC support.
ASKER CERTIFIED SOLUTION
Avatar of rajeev_devin
rajeev_devin

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
SOLUTION
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
Avatar of jribble
jribble

ASKER

Ok, that was easy enough.  Maybe its not fair to ask another question, but how do I add a class/function and make it available to my application?
Put the declaration of the function or class in a header file.
Put the definition of the function or class in a source file.

In your application you need to include the header file.
#include "mydll.h"

In addition you will get a .lib file along with the .dll file.
In your linked settings add this .lib file to avoid linking error.

thats it.
good luck !