Note this is a wx question, not a Geany question.
You need to set the wx includes directories for compiles and probably library directories for the linker.
I am not a wx user and my quick perusal of the wx website did not show any information about how to build a wx program, not even the "hello world" one.
Perhaps you can ask on the wx support and point out that this is missing information for newbies.
Cheers Lex
On Sat, 13 May 2023 at 21:00, Jean-Philippe Combe via Users users@lists.geany.org wrote:
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
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org