audax321
April 23rd, 2005, 07:08 PM
Hello,
I'm trying to compile this example I found:
Source: hworld.cpp (http://www.dieburnbot.com/hworld.cpp)
Here are the errors I get when I compile. Can someone else run this and see if they get something similar... its complaining about using converting from char to wxString... but the program is not using a char where the error is encountered...
Here's my output:
chiddy@ubuntu:~$ g++ hworld.cpp `wx-config --libs` `wx-config --cxxflags` -o hworld
hworld.cpp: In member function `virtual bool MyApp::OnInit()':
hworld.cpp:40: error: conversion from `const char[12]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp: In constructor `MyFrame::MyFrame(const wxString&, const wxPoint&,
const wxSize&)':
hworld.cpp:51: error: conversion from `const char[10]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp:53: error: conversion from `const char[6]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp:56: error: conversion from `const char[6]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp:61: error: conversion from `const char[22]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp: In member function `void MyFrame::OnAbout(wxCommandEvent&)':
hworld.cpp:72: error: invalid initialization of reference of type 'const
wxString&' from expression of type 'const char*'
/usr/include/wx-2.5/wx/msgdlg.h:36: error: in passing argument 1 of `int
wxMessageBox(const wxString&, const wxString&, long int, wxWindow*, int,
int)'
Thanks in advance :)
I'm trying to compile this example I found:
Source: hworld.cpp (http://www.dieburnbot.com/hworld.cpp)
Here are the errors I get when I compile. Can someone else run this and see if they get something similar... its complaining about using converting from char to wxString... but the program is not using a char where the error is encountered...
Here's my output:
chiddy@ubuntu:~$ g++ hworld.cpp `wx-config --libs` `wx-config --cxxflags` -o hworld
hworld.cpp: In member function `virtual bool MyApp::OnInit()':
hworld.cpp:40: error: conversion from `const char[12]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp: In constructor `MyFrame::MyFrame(const wxString&, const wxPoint&,
const wxSize&)':
hworld.cpp:51: error: conversion from `const char[10]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp:53: error: conversion from `const char[6]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp:56: error: conversion from `const char[6]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp:61: error: conversion from `const char[22]' to `const wxString' is
ambiguous
/usr/include/wx-2.5/wx/string.h:646: error: candidates are:
wxString::wxString(wchar_t, unsigned int) <near match>
/usr/include/wx-2.5/wx/string.h:635: error:
wxString::wxString(int) <near match>
hworld.cpp: In member function `void MyFrame::OnAbout(wxCommandEvent&)':
hworld.cpp:72: error: invalid initialization of reference of type 'const
wxString&' from expression of type 'const char*'
/usr/include/wx-2.5/wx/msgdlg.h:36: error: in passing argument 1 of `int
wxMessageBox(const wxString&, const wxString&, long int, wxWindow*, int,
int)'
Thanks in advance :)