Hello everyone,
I use Geany for many years for Pearl and MQL4 language but I would like to learn standard c++ with Geany and I have some problems to compile :
My example program :
//#include <wx/wx.h>
#include "/usr/include/wx-3.2/wx/wx.h" // this file exists !
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
class MyFrame : public wxFrame
{
public:
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
};
bool MyApp::OnInit()
{
MyFrame *frame = new MyFrame("Hello World", wxPoint(50, 50), wxSize(450, 340));
frame->Show(true);
return true;
}
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame(NULL, wxID_ANY, title, pos, size)
{
wxMenu *menuFile = new wxMenu;
menuFile->Append(wxID_EXIT);
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
SetMenuBar(menuBar);
CreateStatusBar();
SetStatusText("Welcome to wxWidgets!");
}
wxIMPLEMENT_APP(MyApp);
WHEN I BUILD :
g++ -Wall -o "wxhello" "wxhello.cpp" (dans le dossier : /home/jpc/projets/Learning_Cpp)
In file included from wxhello.cpp:2:
/usr/include/wx-3.2/wx/wx.h:14:10: fatal error: wx/defs.h: Aucun fichier ou dossier de ce type
14 | #include "wx/defs.h"
| ^~~~~~~~~~~
compilation terminated.
Compilation échouée.
What, where and how to configure Geany Please ?
Janfi