Author Topic: Compile error ambiguous overload for 'operator='  (Read 5255 times)

Offline TheTuxKeeper

  • Regular
  • ***
  • Posts: 293
  • daniel2000
Compile error ambiguous overload for 'operator='
« on: October 06, 2005, 09:32:23 pm »
I wanted to test my Specfile, but I get an error and I was so stupid to update the working CVS version.  :(

I have the anonymous CVS version of twenty minutes before this post. ( GMT+2  21:10)

This error comes on Suse 10.0 (wxGTK 2.6.1):
Code: [Select]
g++ -DHAVE_CONFIG_H -I. -I../../../../../src/plugins/codecompletion -I../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -I../../../../../src/sdk -I../../../../../src/sdk/wxscintilla/include -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -g -O2 -O2 -ffast-math -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -MT classbrowser.lo -MD -MP -MF .deps/classbrowser.Tpo -c ../../../../../src/plugins/codecompletion/classbrowser.cpp  -fPIC -DPIC -o .libs/classbrowser.o
../../../../../src/plugins/codecompletion/parser/token.h: In function 'bool LoadStringFromFile(wxFile*, wxString&)':
../../../../../src/plugins/codecompletion/parser/token.h:128: error: ambiguous overload for 'operator=' in 'str = buf'
/usr/include/wx-2.6/wx/string.h:626: note: candidates are: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.6/wx/string.h:845: note:                 wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.6/wx/string.h:859: note:                 wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.6/wx/string.h:610: note:                 wxString& wxString::operator=(const wxString&) <near match>
make[1]: *** [classbrowser.lo] Error 1

Suse 9.3 (wxGTK 2.5.3):
Code: [Select]
g++ -DHAVE_CONFIG_H -I. -I../../../../../src/plugins/codecompletion -I../../../src/sdk -I/usr/lib/wx/include/gtk2-unicode-release-2.5 -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I../../../../../src/sdk -I../../../../../src/sdk/wxscintilla/include -I/usr/lib/wx/include/gtk2-unicode-release-2.5 -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -g -O2 -O2 -ffast-math -I/usr/lib/wx/include/gtk2-unicode-release-2.5 -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -MT classbrowser.lo -MD -MP -MF .deps/classbrowser.Tpo -c ../../../../../src/plugins/codecompletion/classbrowser.cpp  -fPIC -DPIC -o .libs/classbrowser.o
In file included from ../../../../../src/plugins/codecompletion/parser/parserthread.h:9,
                 from ../../../../../src/plugins/codecompletion/parser/parser.h:9,
                 from ../../../../../src/plugins/codecompletion/classbrowser.h:8,
                 from ../../../../../src/plugins/codecompletion/classbrowser.cpp:26:
../../../../../src/plugins/codecompletion/parser/token.h: In function `bool
   LoadStringFromFile(wxFile*, wxString&)':
../../../../../src/plugins/codecompletion/parser/token.h:128: error: ambiguous
   overload for 'operator=' in 'str = buf'
/usr/include/wx-2.5/wx/string.h:643: error: candidates are: wxString&
   wxString::operator=(int) <near match>
/usr/include/wx-2.5/wx/string.h:857: error:                 wxString&
   wxString::operator=(wchar_t) <near match>
/usr/include/wx-2.5/wx/string.h:864: error:                 wxString&
   wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.5/wx/string.h:919: error:                 wxString&
   wxString::operator=(const wxString&) <near match>
make[1]: *** [classbrowser.lo] Error 1

I hope you can help me because I want to build a test-RPM  :D

Thank you

Daniel

EDIT:
Sorry for using the searchfunction after posting

Here is the Thread with the same problem:
Unicode compile error code-completion plugin oktober 4th
« Last Edit: October 06, 2005, 09:38:02 pm by daniel2000 »
Nightly builds for openSUSE

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Compile error ambiguous overload for 'operator='
« Reply #1 on: October 06, 2005, 09:51:24 pm »
See here http://forums.codeblocks.org/index.php/topic,1014.0.html

EDIT: I saw your EDIT after my post :P
« Last Edit: October 06, 2005, 09:54:01 pm by takeshimiya »