How to export a class from Extension MFC dll to another Extension MFC dll 
Author Message
 How to export a class from Extension MFC dll to another Extension MFC dll

hello experts, I have an Extension MFC dll project named project1, it has an
export class:
class AFX_EXT_CLASS CMainView:public CView
{
....

Quote:
}//

I want to use CMainView in another Extension MFC dll project named project2:

class AFX_EXT_CLASS CMyView:public CMainView
{
....

Quote:
};

When I build project2, I got the following link error:
error LNK2001: unresolved external symbol "public: static
struct CRuntimeClass const  CMainView::classCMainView"

Seems I should import CMainView from project1 to project2, right? How to do
this? Thanks



Fri, 22 Apr 2005 10:01:01 GMT  
 How to export a class from Extension MFC dll to another Extension MFC dll
Hi Yue,

To export from MFC extension DLL, you can check the article below:

Q128199 HOWTO: Use _declspec(dllexport) in an MFC Extension DLL
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q128199

Hope this helps.

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

| Subject: How to export a class from Extension MFC dll to another
Extension MFC dll
| Date: Mon, 4 Nov 2002 17:01:01 +0800
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

| Newsgroups: microsoft.public.vc.mfc
| NNTP-Posting-Host: 218.68.239.98
| Path: cpmsftngxa09!cpmsftngxa10!tkmsftngp01!tkmsftngp09
| Xref: cpmsftngxa09 microsoft.public.vc.mfc:353952
| X-Tomcat-NG: microsoft.public.vc.mfc
|
| hello experts, I have an Extension MFC dll project named project1, it has
an
| export class:
| class AFX_EXT_CLASS CMainView:public CView
| {
| ....
| }//
|
| I want to use CMainView in another Extension MFC dll project named
project2:
|
| class AFX_EXT_CLASS CMyView:public CMainView
| {
| ....
| };
|
| When I build project2, I got the following link error:
| error LNK2001: unresolved external symbol "public: static
| struct CRuntimeClass const  CMainView::classCMainView"

|
| Seems I should import CMainView from project1 to project2, right? How to
do
| this? Thanks
|
|
|



Sun, 24 Apr 2005 06:46:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. a MFC extension DLL in another MFC extension DLL

2. LNK2001 when trying to link a MFC Extension DLL into another Extension DLL

3. loading an MFC DLL that was originally an extension dll from a non MFC dLL

4. Regular DLL -VS- MFC Extension DLL and exporting functions

5. Exported View class in MFC extension dll

6. Shell extension using MFC extension DLLs

7. Access Violation when ADO is used from global object exported from MFC extensions DLL (VC++)

8. MFC Extension DLL: exporting a subclass of CAsyncMonikerFile

9. Access Violation when ADO is used from global object exported from MFC extensions DLL (VC++)

10. MFC Extension DLL: exporting a subclass of CAsyncMonikerFile

11. Creating dynamically loading class in MFC Extension DLL

12. statically linking to MFC with MFC extension DLL

 

 
Powered by phpBB® Forum Software