Workspace and pre-requisities:
- Ubuntu 14.04
- wxWidgets-3.0.2 (Click here How to Build)
- Netbeans 8.0.2 (Download here)
Create Intial Class MyApp (MyApp.cpp)
/*************************************************************** * Name: MyApp.cpp * Purpose: Code for Application Class * Author: Dedy Yasriady (yasriady@yahoo.com) * Created: 2014-04-20 * Copyright: Dedy Yasriady (http://yasriady.blogspot.com) * License: **************************************************************/ #include#include class MyApp: public wxApp { public: MyApp() {} virtual ~MyApp() {} virtual bool OnInit(); virtual int OnExit() { return 0; } }; IMPLEMENT_APP (MyApp); inline bool MyApp::OnInit() { //Init main Frame wxFrame* mainFrame = new UIMainFrame(NULL); mainFrame->Show(true); SetTopWindow(mainFrame); return true; }
Get the flle here: UI.fbp
Configure C++ Compiler
On additional "Additional Options" set the value as following:
For debug version:
For debug version:
/opt/wxWidgets/wxWidgets-3.0.2/build2/wx3.0.2ud_static/wx-config --cxxflags
For release version:
/opt/wxWidgets/wxWidgets-3.0.2/build2/wx3.0.2u_static/wx-config --cxxflags
Configure Linker
Set "Additional Options" as follow:
For debug version:
/opt/wxWidgets/wxWidgets-3.0.2/build2/wx3.0.2ud_static/wx-config --libs
For release version:
/opt/wxWidgets/wxWidgets-3.0.2/build2/wx3.0.2u_static/wx-config --libs
Finish, it's so simple. Run the program [F6] and take a look the result similar to image below:
For those impatient, please download complete Project file here. Happy coding....
0 comments:
Post a Comment