problem using self built DLL
- From: wanwan <ericwan78@xxxxxxxxx>
- Date: 20 Apr 2007 11:47:16 -0700
I made an MFC extension DLL, but I couldn't get it working on the
client application. Can somebody please tell me what I did wrong in
the procedure:
1. I started an MFC extension DLL project called "MyDll". I added a
class called "MyClass" and added the keyword AFX_EXT_CLASS in the
class declaration in the header file.
2. I built the project and copied the files "MyDll.dll" and
"MyDll.lib" to the client project folder.
3. In the client project settings, I added the file MyDll.lib in the
linker - input section.
4. I made a MyDll.h file with the line: class AFX_EXT_CLASS MyClass;
5. I used #include "MyDll.h" in the cpp files where I need MyClass.
With the above steps, I expect MyClass to be defined. But when I use
the imported class it gave me the error:
error C2079: 'CClientApp::myobject' uses undefined class 'MyClass'
Please advise.
.
- Follow-Ups:
- Re: problem using self built DLL
- From: Joseph M . Newcomer
- Re: problem using self built DLL
- From: Doug Harrison [MVP]
- Re: problem using self built DLL
- From: David Ching
- Re: problem using self built DLL
- Prev by Date: Re: How the clear window name?
- Next by Date: Re: DHTML_EVENT_ONMOUSEOVER not caught for <TR> and other tags
- Previous by thread: How to tell the WindowsXP X-Close Button to call a destructor
- Next by thread: Re: problem using self built DLL
- Index(es):