Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inconsistent Dll Linkage...

Status
Not open for further replies.

Dannybe2

Programmer
Jan 31, 2001
136
GB
I am getting an inconsistent dll linkage error. I have defined the code as follows:

query.cpp file:
#define INTERNAL 1
...functions...

query.h file:
#ifdef INTERNAL
#define EXPORTS __declspec(dllexport)
#else
#define EXPORTS __declspec(dllimport)
#endif

class EXPORTS CLS
{
...functions...
}

The error is C4273 inconsistent dll linkage and I can't work out how to get rid of it.

Any help would be appreciated.
Thanks,
Dan
 
Ok, here is what to do.
take the
Code:
#define INTERNAL 1
out of your .cpp file
Now enter INTERNAL into the Preprocessor definitions box on the C/C++ tab of the project settings dialog.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top