当我添加一些设备 oem 类(使用 stdafx.h)时,我的 qt 应用程序出现编译错误。
"Error 1 error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
根据我从互联网上找到的内容,我将我的项目属性设置为“在共享 DLL 中使用 MFC”以解决错误,但是当我再次编译时,它会产生一些其他错误:
Error 1 error C2664: 'LONG SCardConnectW(SCARDCONTEXT,LPCWSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD)' : cannot convert argument 2 from 'const char *' to 'LPCWSTR'
Error 2 error C2440: '=' : cannot convert from 'int8 *' to 'LPCWSTR'
Error 3 error C2679: binary '=' : no operator found which takes a right-hand operand of type 'LPCWSTR' (or there is no acceptable conversion)
Error 4 error C2664: 'LONG SCardStatusW(SCARDHANDLE,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD)' : cannot convert argument 2 from 'int8 *' to 'LPWSTR'
我尝试设置为使用 Unicode 字符集和使用多字节字符集,但没有解决问题。