1,221
社区成员
发帖
与我相关
我的任务
分享
1>xrayworkerDlg.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __thiscall LibTDI::LibTDI(void)" (__imp_??0LibTDI@@QAE@XZ),该符号在函数 "public: __thiscall CxrayworkerDlg::CxrayworkerDlg(class CWnd *)" (??0CxrayworkerDlg@@QAE@PAVCWnd@@@Z) 中被引用
1>xrayworkerDlg.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall LibTDI::Set_TDI_V2(int,int,int)" (__imp_?Set_TDI_V2@LibTDI@@QAEHHHH@Z),该符号在函数 __catch$?OnInitDialog@CxrayworkerDlg@@MAEHXZ$0 中被引用
1>xrayworkerDlg.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall LibTDI::TDI_SwitchGear(int)" (__imp_?TDI_SwitchGear@LibTDI@@QAEHH@Z),该符号在函数 __catch$?OnInitDialog@CxrayworkerDlg@@MAEHXZ$0 中被引用
1>xrayworkerDlg.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: int __thiscall LibTDI::CheckConnection(void)" (__imp_?CheckConnection@LibTDI@@QAEHXZ),该符号在函数 __catch$?OnInitDialog@CxrayworkerDlg@@MAEHXZ$0 中被引用
1>xrayworkerDlg.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: bool __thiscall LibTDI::Connect(void)" (__imp_?Connect@LibTDI@@QAE_NXZ),该符号在函数 __catch$?OnInitDialog@CxrayworkerDlg@@MAEHXZ$0 中被引用
1>xrayworkerDlg.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __thiscall LibTDI::Disconnect(void)" (__imp_?Disconnect@LibTDI@@QAEXXZ),该符号在函数 "public: void __thiscall CxrayworkerDlg::OnBnClickedCancel(void)" (?OnBnClickedCancel@CxrayworkerDlg@@QAEXXZ) 中被引用
1>D:\Projects\xrayworker\Debug\xrayworker.exe : fatal error LNK1120: 6 个无法解析的外部命令
LIBRARY TDICOM.DLL
EXPORTS
@LibTDI@BinToInt$q3USC @2 ; LibTDI::BinToInt(USC)
@LibTDI@CheckConnection$qv @6 ; LibTDI::CheckConnection()
@LibTDI@Connect$qv @1 ; LibTDI::Connect()
@LibTDI@Disconnect$qv @5 ; LibTDI::Disconnect()
@LibTDI@Get_TDI_V2$qii @8 ; LibTDI::Get_TDI_V2(int, int)
@LibTDI@IntToBin$qus @3 ; LibTDI::IntToBin(unsigned short)
@LibTDI@OnWait$qv @7 ; LibTDI::OnWait()
@LibTDI@Set_TDI_V2$qiii @9 ; LibTDI::Set_TDI_V2(int, int, int)
@LibTDI@TDI_SwitchGear$qi @10 ; LibTDI::TDI_SwitchGear(int)
@LibTDI@checksum$qpucus @4 ; LibTDI::checksum(unsigned char *, unsigned short)
___CPPdebugHook @11 ; ___CPPdebugHook
//tdi.h
#ifndef TDI_H
#define TDI_H
#ifdef _CLASSINDLL
#define CLASSINDLL_CLASS_DECL __declspec(dllexport)
#else
#define CLASSINDLL_CLASS_DECL __declspec(dllimport)
#endif
#define TDI_VER 1
#define TDI_SPD 2
//#define TDI_LINES 3
//#define TDI_GAIN 4
#define TDI_GAIN_V2 3
//#define TDI_OFFSET 5
#define TDI_OFFSET_V2 4
//#define TDI_V2_GAIN_OFFSET 3
#define TDI_CMD_END 0x0D
#define TDI_CMD_END2 0x0A
#define ERR_TDI_232_DISCONNECT -1
#define ERR_TDI_232_NORESPOND -2
#define ERR_TDI_PCI_NOHANDLE -3
#define ERR_TDI_PCI_FUNCNOLOAD -4
#define ERR_TDI_CMD_OK 1
#define ERR_TDI_CMD_SYNTAXERR -5//s
#define ERR_TDI_CMD_UNKNOWN -6
#define TDI_SENSORNUM 20
#define TDI_SENSOR_PIXELNUM 143
#define TDI_AVAILABLE_SENSOR_PIXELNUM 138
#define TDI_AVAILABLE_SENSOR_PIXELNUM_OFFSET 2
#define TDI_UNCERTAIN_LINES 20
#define TDI_STAR 1
#define TDI_STOP 2
#define TDI_HVOLTAGE_ON 3
#define TDI_HVOLTAGE_OFF 4
#define TDI_INTEGRAL_FACTOR 0.75/270.0
#define TDI_PIXEL_MEASURE 15.0
#define TDI_LINE_INTEGRAL_TIME(value) TDI_INTEGRAL_FACTOR*value
#define TDI_LINE_TRANS_TIME(value) TDI_INTEGRAL_FACTOR*1000+(value-270)*TDI_INTEGRAL_FACTOR
class USC{
public:
BYTE high ;
BYTE low ;
USC(){high=0;low=0;}
USC(BYTE h,BYTE l)
{
high=h;
low=l;
}
} ;
#pragma comment(lib,"TDIcom.lib")
class CLASSINDLL_CLASS_DECL LibTDI {
void OnWait();
BYTE checksum(BYTE *list,WORD len);
WORD BinToInt(USC c) ;
USC IntToBin(WORD c) ;
public:
LibTDI(){};
bool Connect();
void Disconnect();
BOOL CheckConnection();
int Get_TDI_V2(int code,int para);
BOOL Set_TDI_V2(int code,int para,int para2);
BOOL TDI_SwitchGear(int type) ;
};
#endif