Forum posts for driver.exe

Linker problem on VS2005 with VC++

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'
id 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'
id 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'ProjectsCMPW32DebugDriver.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

View complete forum thread with replies

Other posts related to driver.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

Unable to access mapped net driver when process created from an windows service program (non&hellip;
Inconsistent behavior of web driver with IE9
Linker problem on VS2005 with VC++
What is wrong with this date string? causing: &ldquo;Unhandled Exception: System.FormatException&rdquo;
[Solved]*** No rule to make target `module_netcdf_io.o&#39;, needed by `driver.exe&#39;. Stop. Error

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.