CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Threaded View

  1. #3
    Join Date
    Apr 2007
    Posts
    68

    Re: Invoking MFC exe methods from MFC Extension dll

    Thanks for the prompt reply

    I have done this steps before itself. I mean I had added the lib file in the linker and included the header file also.

    Below is the piece of code where I am facing problem.
    CTestApp *pISL = new CTestApp; //CTestApp is the exe to be launched and I need a pointer to its //member functions
    pISL->calculateTot();

    The above piece of code gives a linker error as follows
    error LNK2001: unresolved external symbol "public: __thiscall CTestApp::CTestApp(void)" (??0CRBSTApp@@QAE@XZ)



    In the exported exe I have the methods as follows:
    __declspec(dllexport) CTestApp();
    __declspec(dllexport) virtual BOOL InitInstance();
    __declspec(dllexport) void calculateTot();



    But the following code compiles properly
    CTestApp *pISL;
    pISL->calculateTot();

    Can I know what is the problem in this. I mean I am not able to craete an object/instance of CTestApp.
    Last edited by zuhrs; October 6th, 2011 at 03:17 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured