2010年3月4日 星期四

2010年3月1日 星期一

error LNK2001: unresolved external symbol _CeRapiInitEx@4

使用CeRapiInitEx function
產生下列error

Error 1 error LNK2001: unresolved external symbol _CeRapiInitEx@4 SampleCodeCoworkWithSFCIDlg.obj SampleCodeCoworkWithSFCI


Error 2 error LNK2001: unresolved external symbol _CeRapiUninit@0 SampleCodeCoworkWithSFCIDlg.obj SampleCodeCoworkWithSFCI

Error 3 fatal error LNK1120: 2 unresolved externals

需要將rapi.lib路徑加入
Project->Properties->Configuration Properties->Linker->Input->Additional Dependencies->路徑\rapi.lib

透過Facebook分享

const char to LPCTSTR error

Project->Properties
set
Configuration Properties->General->Characeter Set->Use Unicode Character Set

build

error message
Error 4 error C2664: 'void ATL::CStringT::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [109]' to 'const wchar_t *' h:\SW\Project\GPRS\Factory\src\SampleCodeCoworkWithSFCI\SampleCodeCoworkWithSFCI\SampleCodeCoworkWithSFCIDlg.cpp 157 SampleCodeCoworkWithSFCI

Error 5 error C2664: 'CSampleCodeCoworkWithSFCIDlg::RceExecuteFile' : cannot convert parameter 1 from 'const char [18]' to 'LPCTSTR' h:\SW\Project\GPRS\Factory\src\SampleCodeCoworkWithSFCI\SampleCodeCoworkWithSFCI\SampleCodeCoworkWithSFCIDlg.cpp 189 SampleCodeCoworkWithSFCI

Project->Properties
set
Configuration Properties->General->Characeter Set->Use Multi-Byte Character Set

It is ok.

透過Facebook分享