| Stefan Ritt wrote: | 
         
        
            | 
             
             
                
                    
                        | Dmitry Hits wrote: | 
                     
                    
                        | 
                          Hi, 
                        I am getting the following compilation error when trying to compile version 5.0.2 software: 
                        src/DOFrame.cpp:617:14: error: invalid conversion from ‘char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive] 
                          
                        I have wxWidgets v. 2.8.12 package on Fedora version 3.9.10-100.fc17.x86_64 
                          
                        Has anyone seen this before? 
                          
                        Thank you, 
                          
                        Dmitry  
                          
                        --------------------------------------------------------------------------------------------- 
                        Full error report: 
                        g++ -g -O2 -Wall -Wuninitialized -fno-strict-aliasing -Iinclude -I/usr/local/include -DOS_LINUX -DHAVE_USB -DHAVE_LIBUSB10 -DUSE_DRS_MUTEX -I/usr/lib64/wx/include/gtk 
                        2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -c src/DOFrame.cpp 
                        src/DOFrame.cpp: In member function ‘void DOFrame::LoadConfig(char*, int)’: 
                        src/DOFrame.cpp:617:14: error: invalid conversion from ‘char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive] 
                        In file included from /usr/include/wx-2.8/wx/memory.h:16:0, 
                                         from /usr/include/wx-2.8/wx/object.h:20, 
                                         from /usr/include/wx-2.8/wx/wx.h:16, 
                                         from include/DRSOscInc.h:9, 
                                         from src/DOFrame.cpp:9: 
                        /usr/include/wx-2.8/wx/string.h:1413:13: error:   initializing argument 1 of ‘wxString& wxString::operator+=(wxChar)’ [-fpermissive] 
                         | 
                     
                
             
            
            I don't get this error under gcc 4.4.7, so I guess you have a newer version. Each one becomes more picky. Just try to replace 
            str += filename;  
            with 
            str += (wxString) filename; 
            in line 617 of DOFrame.cpp 
            /Stefan 
              
             | 
         
    
 
Hi Stefan, 
  
Unfortunately that did not work and from suggestions in the error I do see a good solution: 
---------------------------- 
src/DOFrame.cpp: In member function ‘void DOFrame::LoadConfig(char*, int)’: 
src/DOFrame.cpp:617:25: error: call of overloaded ‘wxString(char [1024])’ is ambiguous 
src/DOFrame.cpp:617:25: note: candidates are: 
/usr/include/wx-2.8/wx/string.h:722:3: note: wxString::wxString(const wxWCharBuffer&) <near match> 
/usr/include/wx-2.8/wx/string.h:722:3: note:   no known conversion for argument 1 from ‘char [1024]’ to ‘const wxWCharBuffer&’ 
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match> 
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘char [1024]’ to ‘wxChar {aka wchar_t}’ 
/usr/include/wx-2.8/wx/string.h:690:3: note: wxString::wxString(const wxString&) <near match> 
/usr/include/wx-2.8/wx/string.h:690:3: note:   no known conversion for argument 1 from ‘char [1024]’ to ‘const wxString&’ 
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match> 
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘char [1024]’ to ‘int’ 
--------------------------------- 
  
let me know if you see one. 
  
Thank you, 
  
Dmitry. 
  
  
  
_____________________________________________________________________________________________________________________________________________ 
Full error: 
++ -g -O2 -Wall -Wuninitialized -fno-strict-aliasing -Iinclude -I/usr/local/include -DOS_LINUX -DHAVE_USB -DHAVE_LIBUSB10 -DUSE_DRS_MUTEX -I/usr/lib64/wx/include/gtk 
2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -c src/DOFrame.cpp 
src/DOFrame.cpp: In member function ‘void DOFrame::LoadConfig(char*, int)’: 
src/DOFrame.cpp:617:14: error: invalid conversion from ‘char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive] 
In file included from /usr/include/wx-2.8/wx/memory.h:16:0, 
                 from /usr/include/wx-2.8/wx/object.h:20, 
                 from /usr/include/wx-2.8/wx/wx.h:16, 
                 from include/DRSOscInc.h:9, 
                 from src/DOFrame.cpp:9: 
/usr/include/wx-2.8/wx/string.h:1413:13: error:   initializing argument 1 of ‘wxString& wxString::operator+=(wxChar)’ [-fpermissive] 
[dmitry@kitkat ~]$ more error-drs4v5_2 
g++ -g -O2 -Wall -Wuninitialized -fno-strict-aliasing -Iinclude -I/usr/local/include -DOS_LINUX -DHAVE_USB -DHAVE_LIBUSB10 -DUSE_DRS_MUTEX -I/usr/lib64/wx/include/gtk 
2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -c src/DOFrame.cpp 
src/DOFrame.cpp: In member function ‘void DOFrame::LoadConfig(char*, int)’: 
src/DOFrame.cpp:617:25: error: call of overloaded ‘wxString(char [1024])’ is ambiguous 
src/DOFrame.cpp:617:25: note: candidates are: 
In file included from /usr/include/wx-2.8/wx/memory.h:16:0, 
                 from /usr/include/wx-2.8/wx/object.h:20, 
                 from /usr/include/wx-2.8/wx/wx.h:16, 
                 from include/DRSOscInc.h:9, 
                 from src/DOFrame.cpp:9: 
/usr/include/wx-2.8/wx/string.h:722:3: note: wxString::wxString(const wxWCharBuffer&) <near match> 
/usr/include/wx-2.8/wx/string.h:722:3: note:   no known conversion for argument 1 from ‘char [1024]’ to ‘const wxWCharBuffer&’ 
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match> 
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘char [1024]’ to ‘wxChar {aka wchar_t}’ 
/usr/include/wx-2.8/wx/string.h:690:3: note: wxString::wxString(const wxString&) <near match> 
/usr/include/wx-2.8/wx/string.h:690:3: note:   no known conversion for argument 1 from ‘char [1024]’ to ‘const wxString&’ 
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match> 
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘char [1024]’ to ‘int’ 
make: *** [DOFrame.o] Error 1   |