[QUOTE=Ancient Dragon;1121605]Without seeing the contents of MTCSApi.h I have no clue what the problem is, other than the error message you posted
// Symbol USB_DLL_EXPORTS compiled. This symbol should not be defined in another location.
// diese DLL verwendet.
//to export for C++ & C
#define USB_DLL_API __declspec(dllimport)
#ifndef _USB_API_H_
#define _USB_API_H_
#define USB 0
#define COM 1
#ifdef OBJECT
#define USB_DLL_API
#else
#ifdef _USRDLL
#ifdef USB_DLL_EXPORTS
#define USB_DLL_API __declspec(dllexport) __stdcall
#else
#define USB_DLL_API __declspec(dllimport) __stdcall
#endif
#endif
#endif
#ifdef EXE
#ifdef USB_DLL_EXPORTS
#define USB_DLL_API __declspec(dllexport) __stdcall
#else
#define USB_DLL_API __declspec(dllimport) __stdcall
#endif
#endif
#ifdef INDEX
#include "MTCSApi_idx.h"
#endif
#ifndef OBJECT
#if defined(__cplusplus)
extern "C" {
#endif
#endif
void USB_DLL_API MTCSDllGetVersion(char* cBuf);
int USB_DLL_API MTCSInitSystem( char cTyp, int iVendorID, int iProductID );
int USB_DLL_API MTCSReadVersion( char* cBuf);
int USB_DLL_API MTCSReadMemory( unsigned char* cBuf, int iNum);
int USB_DLL_API MTCSWriteMemory( unsigned char* cBuf, int iNum);
int USB_DLL_API MTCSGetADCBL( unsigned short* usBuf, int iCounts);
int USB_DLL_API MTCSGetADCAVR( unsigned short* usBuf, int iCounts);
int USB_DLL_API MTCSGetADCBuf( unsigned short* usBuf);
int USB_DLL_API MTCSGetADC( unsigned short* usBuf);
int USB_DLL_API MTCSSetSwitch( int iCounts);
int USB_DLL_API MTCSSetEPoti( int iCounts);
int USB_DLL_API MTCSGetRGB( unsigned short* usBuf);
int USB_DLL_API MTCSStartRGB( unsigned short* usBuf, int iTime, int iCycles);
int USB_DLL_API MTCSStopRGB( unsigned short* usBuf);
int USB_DLL_API MTCSCloseDevice(void);
int USB_DLL_API MTCSSetUpdateMode(void);
void USB_DLL_API MTCSGetSerienNummer( unsigned char idx, char *buffer);
int USB_DLL_API MTCSGetADCAVR2( int iIndex, unsigned short* usBuf, int iCounts);
int USB_DLL_API MTCSGetADCSummen( int iIndex, unsigned long* ulBuf, int iCounts);
int USB_DLL_API MTCSSetParameter( int iIndex, int iVerst, int iTol);
int USB_DLL_API MTCSSearchAmplification( int iIndex, unsigned short* usBuf, int iLimit);
int USB_DLL_API MTCSReadMemFromAdr( int iIndex, unsigned char* cBuf, int iAdr, int iNum);
int USB_DLL_API MTCSWriteMemToAdr(int iIndex, unsigned char* cBuf, int iAdr, int iNum);
int USB_DLL_API MTCSSetShift( int iIndex, int iShift);
#ifndef OBJECT
#ifdef __cplusplus
}
#endif
#endif
/**************************************************************************************/
#endif /* _USB_API_H_ */
/**************************************************************************************/
dear Dragon,
the above is the header file, i have resolved the earlier errors, they were due to the first line #define USB_DLL_API __declspec(dllimport) not being included in it.
now after this I compiled, but now getting linking errors such as following. i have linked to the headers and .lib files perfectly. do you have a clue..
sen2.obj : error LNK2001: unresolved external symbol __imp__MTCSGetADCAVR2
libcid.lib(iostrini.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,int,char const *,int)" (??2@YAPAXIHPBDH@Z)
libcid.lib(_ios.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,int,char const *,int)" (??2@YAPAXIHPBDH@Z)
libcid.lib(streamb.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,int,char const *,int)" (??2@YAPAXIHPBDH@Z)
Debug/Sensor2.exe : fatal error LNK1120: 2 unresolved externals