Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 286489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:38:27+00:00 2026-05-12T05:38:27+00:00

Here’s the scenario: Platform: VS2005 and language is VC++ Situation: There’s just 1 assembly

  • 0

Here’s the scenario:

Platform:
VS2005 and language is VC++

Situation:
There’s just 1 assembly CMPW32. It has 2 projects:
1 is a DLL project called CMPW32 and the 2nd one is an .exe project called Driver
They both share the same Debug folder under the main assembly folder.
I have been able to successfully export a few functions from the DLL. The Driver project accesses 1 of these exported functions. (First of all I am not if functions need to be exported for projects in the SAME assembly to be able to use them. I can just include the header files and use the functions I think.)

Following is are a few lines of code from some files which you might find useful to analyze my problem:

//main.cpp file from the Driver project which is meant to generate Driver.exe

#pragma comment(lib, "winmm.lib")
#include <CM.h>
#include "conio.h"
#include "CMM.h"
#include "CMF.h"
#define C_M_F    _T("c:\\CannedMessages.en-US")
int_tmain (int argc, TCHAR* argv [])
{
    CMM myobjModel;
    CMF::Read (CANNED_MESSAGES_FILE, myobjModel);
    getch();
}

//CMM.h file
#ifndef C_M_M
#define C_M_M
#include "CMD.h"
#include "CMC.h"
#include "CM.h"
#define _C_M_DLL
#include "CMP.h"
class CM_DLL_API CMM
{  //some code here...
}


//CMF.h
#ifndef C_M_F
#define C_M_F
#include "CMM.h"
#define _C_M_DLL
#include "CMP.h"
class CM_DLL_API CMF 
{ //some code here...
}

//CMP.h
#ifndef C_M_P
#define C_M_P
#include "CMD.h"
#define C_M_B_F   _T("CannedMessages.")
#ifdef _C_M_DLL
#define CM_DLL_API __declspec( dllexport ) 
#else
#define CM_DLL_API __declspec( dllimport )
#endif
extern "C"
{
//list of functions to be exported..
}

ERRORS on building the solution:

Error13 error LNK2019: unresolved external symbol “public: __thiscall CMM::~CMM(void)” (??1CMM@@QAE@XZ) referenced in function _wmain main.obj

Error15 fatal error LNK1120: 2 unresolved externals C:\”somepath here which I cant disclose”\Projects\CMPW32\Debug\Driver.exe

Please Note: If I choose to build only the CMPW32 DLL project, there are no errors and the CMPW32.dll file gets generated in the debug folder with the correct functions getting getting exported.
However there seems to be some linking problem that is pretty evident and I don’t know what’s going on. I have included every required file and also have entered the required .lib in the input of the “Project Settings”. The paths have been set correctly too.

It would be really helpful if someone could help me out with this. Please lemme know if additional information required.

Thanks,
Viren

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:38:28+00:00Added an answer on May 12, 2026 at 5:38 am

    Looks like your Driver.exe project does not include the CPP source files of the CMM class, likely CMM.cpp.

    or

    You have declare a destructor for CMM class in your .H file (CMM.H) and forgot to implement it in the .CPP file (CMM.CPP).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the scenario. I'm writing my geo-ruby oracle adapter for Ruby On Rails
Here's a piece of code I copied from http://www.schillmania.com/content/projects/javascript-animation-1/demo/ Very simple JS animation: function
Here is my HTML. Just a simple form: <form> Username: <input type=text id=username/> <br/>
Here are some facts about my app followed by a question My app has
Here is my scenario. I have a website running under AppPool1 and that works
Here are the tables I have: Table A which has entries with item and
Here is my error(if you need any more info just ask)- Error SQL query:
Here the scenario is I have many .aspx pages if any page gives error,
Here's my scenario - I have an SSIS job that depends on another prior
Here is the scenario: I'm writing an app that will watch for any changes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.