Something wrong with my installation?
Martin Jørgensen
hotmail_spam at hotmail.com
Sun Nov 12 15:17:19 PST 2006
Hi,
Here's a completely newbie question again. Sorry, but I must have
overseen something. I even tried google, but with no luck.
I would like to compile this hello-world-tutorial:
http://www.wxwidgets.org/docs/tutorials/hello.htm
But I need a small kick in the right direction. I copy/pasted the code
and this is the result when I try to compile:
---
apple:~/Desktop/temp mac$ g++ `wx-config --cxxflags` test.cpp
test.cpp: In member function 'virtual bool MyApp::OnInit()':
test.cpp:40: error: conversion from 'const char [12]' to 'const
wxString' is ambiguous
/usr/include/wx-2.5/wx/string.h:659: note: candidates are:
wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.5/wx/string.h:649: note:
wxString::wxString(int) <near match>
test.cpp: In constructor 'MyFrame::MyFrame(const wxString&, const
wxPoint&, const wxSize&)':
test.cpp:51: error: conversion from 'const char [10]' to 'const
wxString' is ambiguous
...
...
etc.
---
It seems like it doesn't like the const char's:
bool MyApp::OnInit()
{
MyFrame *frame = new MyFrame( "Hello World", wxPoint(50,50),
wxSize(450,340) ); <<<<-- ERROR "Hello World"
frame->Show(TRUE);
SetTopWindow(frame);
return TRUE;
}
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const
wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
wxMenu *menuFile = new wxMenu;
menuFile->Append( ID_About, "&About..." ); <<<<-- ERROR
---
Any suggestions? It's hopefully something really really simple...
Best regards
Martin Jørgensen
--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
More information about the wx-users
mailing list