c:\wxWidgets\include\wx\string.h(1570) : error C2593: 'operator +' is ambiguous
c:\wxWidgets\include\wx\string.h(1572) : error C2593: 'operator +' is ambiguous
c:\wxWidgets\include\wx\arrstr.h(233) : fatal error C1903: unable to recover from previous error(s); stopping compilation
请问下这个可能的原因是什么呢?
谢谢。
13 个解决方案
#1
重载的operator +有问题吧
#2
并且一直有很多关于库函数的warning,如下:
c:\program files\microsoft visual studio\vc98\include\xmemory(39) : warning C4100: '_P' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xmemory(41) : warning C4100: '_P' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(242) : warning C4511: 'codecvt_base' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(223) : see declaration of 'codecvt_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(242) : warning C4512: 'codecvt_base' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(223) : see declaration of 'codecvt_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : warning C4663: C++ language change: to explicitly specialize class template 'codecvt' use the following syntax:
template<> class codecvt<unsigned short,char,int> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(398) : warning C4511: 'codecvt<unsigned short,char,int>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : see declaration of 'codecvt<unsigned short,char,int>'
c:\program files\microsoft visual studio\vc98\include\xlocale(398) : warning C4512: 'codecvt<unsigned short,char,int>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : see declaration of 'codecvt<unsigned short,char,int>'
c:\program files\microsoft visual studio\vc98\include\xlocale(387) : warning C4018: '<' : signed/unsigned mismatch
c:\program files\microsoft visual studio\vc98\include\xlocale(420) : warning C4511: 'ctype_base' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(410) : see declaration of 'ctype_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(420) : warning C4512: 'ctype_base' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(410) : see declaration of 'ctype_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : warning C4663: C++ language change: to explicitly specialize class template 'ctype' use the following syntax:
template<> class ctype<char> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(611) : warning C4511: 'ctype<char>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : see declaration of 'ctype<char>'
c:\program files\microsoft visual studio\vc98\include\xlocale(611) : warning C4512: 'ctype<char>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : see declaration of 'ctype<char>'
c:\program files\microsoft visual studio\vc98\include\xlocale(552) : warning C4100: '_D' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(554) : warning C4100: '_D' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(513) : warning C4511: 'ctype<unsigned short>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(627) : see reference to class template instantiation 'std::ctype<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(513) : warning C4512: 'ctype<unsigned short>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(627) : see reference to class template instantiation 'std::ctype<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(292) : warning C4511: 'codecvt<char,char,int>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(628) : see reference to class template instantiation 'std::codecvt<char,char,int>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(292) : warning C4512: 'codecvt<char,char,int>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(628) : see reference to class template instantiation 'std::codecvt<char,char,int>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4511: 'numpunct<char>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(646) : see reference to class template instantiation 'std::numpunct<char>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4512: 'numpunct<char>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(646) : see reference to class template instantiation 'std::numpunct<char>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4511: 'numpunct<unsigned short>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(647) : see reference to class template instantiation 'std::numpunct<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4512: 'numpunct<unsigned short>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(647) : see reference to class template instantiation 'std::numpunct<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4511: 'num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(649) : see reference to class template instantiation 'std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4512: 'num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(649) : see reference to class template instantiation 'std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4511: 'num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(651) : see reference to class template instantiation 'std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' being
compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4512: 'num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(651) : see reference to class template instantiation 'std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' being compiled
只截了一部分,请问这个又是什么原因呢?
c:\program files\microsoft visual studio\vc98\include\xmemory(39) : warning C4100: '_P' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xmemory(41) : warning C4100: '_P' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(242) : warning C4511: 'codecvt_base' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(223) : see declaration of 'codecvt_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(242) : warning C4512: 'codecvt_base' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(223) : see declaration of 'codecvt_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : warning C4663: C++ language change: to explicitly specialize class template 'codecvt' use the following syntax:
template<> class codecvt<unsigned short,char,int> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(398) : warning C4511: 'codecvt<unsigned short,char,int>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : see declaration of 'codecvt<unsigned short,char,int>'
c:\program files\microsoft visual studio\vc98\include\xlocale(398) : warning C4512: 'codecvt<unsigned short,char,int>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : see declaration of 'codecvt<unsigned short,char,int>'
c:\program files\microsoft visual studio\vc98\include\xlocale(387) : warning C4018: '<' : signed/unsigned mismatch
c:\program files\microsoft visual studio\vc98\include\xlocale(420) : warning C4511: 'ctype_base' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(410) : see declaration of 'ctype_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(420) : warning C4512: 'ctype_base' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(410) : see declaration of 'ctype_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : warning C4663: C++ language change: to explicitly specialize class template 'ctype' use the following syntax:
template<> class ctype<char> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(611) : warning C4511: 'ctype<char>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : see declaration of 'ctype<char>'
c:\program files\microsoft visual studio\vc98\include\xlocale(611) : warning C4512: 'ctype<char>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : see declaration of 'ctype<char>'
c:\program files\microsoft visual studio\vc98\include\xlocale(552) : warning C4100: '_D' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(554) : warning C4100: '_D' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(513) : warning C4511: 'ctype<unsigned short>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(627) : see reference to class template instantiation 'std::ctype<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(513) : warning C4512: 'ctype<unsigned short>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(627) : see reference to class template instantiation 'std::ctype<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(292) : warning C4511: 'codecvt<char,char,int>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(628) : see reference to class template instantiation 'std::codecvt<char,char,int>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(292) : warning C4512: 'codecvt<char,char,int>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(628) : see reference to class template instantiation 'std::codecvt<char,char,int>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4511: 'numpunct<char>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(646) : see reference to class template instantiation 'std::numpunct<char>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4512: 'numpunct<char>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(646) : see reference to class template instantiation 'std::numpunct<char>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4511: 'numpunct<unsigned short>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(647) : see reference to class template instantiation 'std::numpunct<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4512: 'numpunct<unsigned short>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(647) : see reference to class template instantiation 'std::numpunct<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4511: 'num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(649) : see reference to class template instantiation 'std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4512: 'num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(649) : see reference to class template instantiation 'std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4511: 'num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(651) : see reference to class template instantiation 'std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' being
compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4512: 'num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(651) : see reference to class template instantiation 'std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' being compiled
只截了一部分,请问这个又是什么原因呢?
#3
我自己并没有关于 operator+的函数啊,怎么会有重载的问题?
#4
//wx\string.h
//233
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
__forceinline
#endif
//1570
inline bool operator!=(const wxChar * s1, const wxString& s2)
{ return s2.Cmp(s1) != 0; }
//1572
inline bool operator< (const wxString& s1, const wxString& s2)
{ return s1.Cmp(s2) < 0; }
可能你在追踪代码是无意中把operator!=和operator<给替换成了operator+或不下心添加或删除了什么
随便问一下你是用什么编译啊?
#5
这么多警告啊
你最好设断点跟踪一下
你最好设断点跟踪一下
#6
是不是你用的wxWidgets和VC里自带的string冲突了。
#7
应该不是我误操作了,我从来不去库里改东西的,你就当我是菜鸟新手。
#8
怎么设置断点跟踪啊?我不会。
#9
我也觉得有可能是这个问题,要是这个原因的话怎么办?
#10
把你的wxWidgets的string给注释了
#11
估计有类库重复了
#12
如何解决?那位高手指点下
#13
wxwedgets的string与标准string冲突
#1
重载的operator +有问题吧
#2
并且一直有很多关于库函数的warning,如下:
c:\program files\microsoft visual studio\vc98\include\xmemory(39) : warning C4100: '_P' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xmemory(41) : warning C4100: '_P' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(242) : warning C4511: 'codecvt_base' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(223) : see declaration of 'codecvt_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(242) : warning C4512: 'codecvt_base' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(223) : see declaration of 'codecvt_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : warning C4663: C++ language change: to explicitly specialize class template 'codecvt' use the following syntax:
template<> class codecvt<unsigned short,char,int> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(398) : warning C4511: 'codecvt<unsigned short,char,int>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : see declaration of 'codecvt<unsigned short,char,int>'
c:\program files\microsoft visual studio\vc98\include\xlocale(398) : warning C4512: 'codecvt<unsigned short,char,int>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : see declaration of 'codecvt<unsigned short,char,int>'
c:\program files\microsoft visual studio\vc98\include\xlocale(387) : warning C4018: '<' : signed/unsigned mismatch
c:\program files\microsoft visual studio\vc98\include\xlocale(420) : warning C4511: 'ctype_base' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(410) : see declaration of 'ctype_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(420) : warning C4512: 'ctype_base' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(410) : see declaration of 'ctype_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : warning C4663: C++ language change: to explicitly specialize class template 'ctype' use the following syntax:
template<> class ctype<char> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(611) : warning C4511: 'ctype<char>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : see declaration of 'ctype<char>'
c:\program files\microsoft visual studio\vc98\include\xlocale(611) : warning C4512: 'ctype<char>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : see declaration of 'ctype<char>'
c:\program files\microsoft visual studio\vc98\include\xlocale(552) : warning C4100: '_D' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(554) : warning C4100: '_D' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(513) : warning C4511: 'ctype<unsigned short>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(627) : see reference to class template instantiation 'std::ctype<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(513) : warning C4512: 'ctype<unsigned short>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(627) : see reference to class template instantiation 'std::ctype<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(292) : warning C4511: 'codecvt<char,char,int>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(628) : see reference to class template instantiation 'std::codecvt<char,char,int>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(292) : warning C4512: 'codecvt<char,char,int>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(628) : see reference to class template instantiation 'std::codecvt<char,char,int>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4511: 'numpunct<char>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(646) : see reference to class template instantiation 'std::numpunct<char>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4512: 'numpunct<char>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(646) : see reference to class template instantiation 'std::numpunct<char>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4511: 'numpunct<unsigned short>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(647) : see reference to class template instantiation 'std::numpunct<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4512: 'numpunct<unsigned short>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(647) : see reference to class template instantiation 'std::numpunct<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4511: 'num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(649) : see reference to class template instantiation 'std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4512: 'num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(649) : see reference to class template instantiation 'std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4511: 'num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(651) : see reference to class template instantiation 'std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' being
compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4512: 'num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(651) : see reference to class template instantiation 'std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' being compiled
只截了一部分,请问这个又是什么原因呢?
c:\program files\microsoft visual studio\vc98\include\xmemory(39) : warning C4100: '_P' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xmemory(41) : warning C4100: '_P' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(242) : warning C4511: 'codecvt_base' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(223) : see declaration of 'codecvt_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(242) : warning C4512: 'codecvt_base' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(223) : see declaration of 'codecvt_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : warning C4663: C++ language change: to explicitly specialize class template 'codecvt' use the following syntax:
template<> class codecvt<unsigned short,char,int> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(398) : warning C4511: 'codecvt<unsigned short,char,int>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : see declaration of 'codecvt<unsigned short,char,int>'
c:\program files\microsoft visual studio\vc98\include\xlocale(398) : warning C4512: 'codecvt<unsigned short,char,int>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(296) : see declaration of 'codecvt<unsigned short,char,int>'
c:\program files\microsoft visual studio\vc98\include\xlocale(387) : warning C4018: '<' : signed/unsigned mismatch
c:\program files\microsoft visual studio\vc98\include\xlocale(420) : warning C4511: 'ctype_base' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(410) : see declaration of 'ctype_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(420) : warning C4512: 'ctype_base' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(410) : see declaration of 'ctype_base'
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : warning C4663: C++ language change: to explicitly specialize class template 'ctype' use the following syntax:
template<> class ctype<char> ...
c:\program files\microsoft visual studio\vc98\include\xlocale(611) : warning C4511: 'ctype<char>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : see declaration of 'ctype<char>'
c:\program files\microsoft visual studio\vc98\include\xlocale(611) : warning C4512: 'ctype<char>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(519) : see declaration of 'ctype<char>'
c:\program files\microsoft visual studio\vc98\include\xlocale(552) : warning C4100: '_D' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(554) : warning C4100: '_D' : unreferenced formal parameter
c:\program files\microsoft visual studio\vc98\include\xlocale(513) : warning C4511: 'ctype<unsigned short>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(627) : see reference to class template instantiation 'std::ctype<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(513) : warning C4512: 'ctype<unsigned short>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(627) : see reference to class template instantiation 'std::ctype<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(292) : warning C4511: 'codecvt<char,char,int>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(628) : see reference to class template instantiation 'std::codecvt<char,char,int>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocale(292) : warning C4512: 'codecvt<char,char,int>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocale(628) : see reference to class template instantiation 'std::codecvt<char,char,int>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4511: 'numpunct<char>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(646) : see reference to class template instantiation 'std::numpunct<char>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4512: 'numpunct<char>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(646) : see reference to class template instantiation 'std::numpunct<char>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4511: 'numpunct<unsigned short>' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(647) : see reference to class template instantiation 'std::numpunct<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(69) : warning C4512: 'numpunct<unsigned short>' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(647) : see reference to class template instantiation 'std::numpunct<unsigned short>' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4511: 'num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(649) : see reference to class template instantiation 'std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4512: 'num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(649) : see reference to class template instantiation 'std::num_get<char,class std::istreambuf_iterator<char,struct std::char_traits<char> > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4511: 'num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' : copy constructor could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(651) : see reference to class template instantiation 'std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' being
compiled
c:\program files\microsoft visual studio\vc98\include\xlocnum(412) : warning C4512: 'num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' : assignment operator could not be generated
c:\program files\microsoft visual studio\vc98\include\xlocnum(651) : see reference to class template instantiation 'std::num_get<unsigned short,class std::istreambuf_iterator<unsigned short,struct std::char_traits<unsigned short> > >' being compiled
只截了一部分,请问这个又是什么原因呢?
#3
我自己并没有关于 operator+的函数啊,怎么会有重载的问题?
#4
//wx\string.h
//233
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
__forceinline
#endif
//1570
inline bool operator!=(const wxChar * s1, const wxString& s2)
{ return s2.Cmp(s1) != 0; }
//1572
inline bool operator< (const wxString& s1, const wxString& s2)
{ return s1.Cmp(s2) < 0; }
可能你在追踪代码是无意中把operator!=和operator<给替换成了operator+或不下心添加或删除了什么
随便问一下你是用什么编译啊?
#5
这么多警告啊
你最好设断点跟踪一下
你最好设断点跟踪一下
#6
是不是你用的wxWidgets和VC里自带的string冲突了。
#7
应该不是我误操作了,我从来不去库里改东西的,你就当我是菜鸟新手。
#8
怎么设置断点跟踪啊?我不会。
#9
我也觉得有可能是这个问题,要是这个原因的话怎么办?
#10
把你的wxWidgets的string给注释了
#11
估计有类库重复了
#12
如何解决?那位高手指点下
#13
wxwedgets的string与标准string冲突