Debug编译运行都没有问题,Release编译错误error C2664: 'ATL::CStringT<BaseType,StringTraits>::CStringT(const VARIANT

平台:Win7 X64   解决方法:project-Configuration Properties-General-Character Set选择Use Multi-Byte Character Set

详细编译错误如下:

1>c:\program files\teledyne dalsa\sapera\classes\gui\LoadSaveDlg.h(27) : error C2664: 'ATL::CStringT<BaseType,StringTraits>::CStringT(const VARIANT &)' : cannot convert parameter 1 from 'char [260]' to 'const VARIANT &'
1>        with
1>        [
1>            BaseType=wchar_t,
1>            StringTraits=StrTraitMFC_DLL<wchar_t>
1>        ]
1>        Reason: cannot convert from 'char [260]' to 'const VARIANT'
1>        No constructor could take the source type, or constructor overload resolution was ambiguous
1>.\SaveShowDlg.cpp(144) : error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [28]' to 'const wchar_t *'
1>        with
1>        [
1>            BaseType=wchar_t,
1>            StringTraits=StrTraitMFC_DLL<wchar_t>
1>        ]
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\SaveShowDlg.cpp(294) : error C2664: 'CComboBox::AddString' : cannot convert parameter 1 from 'char *' to 'LPCTSTR'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\SaveShowDlg.cpp(346) : error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'const char [71]' to 'LPCTSTR'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\SaveShowDlg.cpp(430) : error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types
1>        C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxwin.h(5372): could be 'int AfxMessageBox(LPCTSTR,UINT,UINT)'
1>        C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxwin.h(5374): or       'int AfxMessageBox(UINT,UINT,UINT)'
1>        while trying to match the argument list '(const char [10])'
1>.\SaveShowDlg.cpp(649) : error C2664: 'SapBuffer::Save' : cannot convert parameter 1 from 'CString' to 'const char *'
1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>SaveShow.cpp
1>c:\program files\teledyne dalsa\sapera\classes\gui\LoadSaveDlg.h(27) : error C2664: 'ATL::CStringT<BaseType,StringTraits>::CStringT(const VARIANT &)' : cannot convert parameter 1 from 'char [260]' to 'const VARIANT &'
1>        with
1>        [
1>            BaseType=wchar_t,
1>            StringTraits=StrTraitMFC_DLL<wchar_t>
1>        ]
1>        Reason: cannot convert from 'char [260]' to 'const VARIANT'
1>        No constructor could take the source type, or constructor overload resolution was ambiguous
1>Build log was saved at "file://e:\PR\SaveShow_0.12color\SaveShow\x64\Release\BuildLog.htm"
1>SaveShow - 7 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值