Wednesday, May 16, 2012

Linux. Eclipse + wxWidgets

In this post I describe how I installed wxWidgets and Eclipse at Linux system and make them work together.

Here is my plan:

1. Install wxWidgets

  1.1 download

    I use this link. It's last stable version for this moment.

  1.2 unpack

    I use this command: tar -xvf <wxWidgets archive.tar.gz>

  1.3 build

  • change directory to unpacked archive cd <wxWidgets folder>
  • make build folder mkdir <wxWidgets build folder>
  • change current directory to build folder cd <wxWidgets build folder>
  • I select following parameters for configure script:
    ../configure --enable-stl --enable-unicode --enable-static --disable-shared --enable-monolithic --enable-debug
  • then type make
  • then sudo make install
  • and sudo ldconfig

1.4 *checkpoint*: build 'minimal' sample application

    I run make command in <wxWidgets build folder>/minimal> directory and get minimal wxWidgets application.

2. Install Eclipse

  2.1 install Java if it's not installed

    I use this link.

  2.2 *checkpoint*: get Java's version

    java -version

  2.3 download Eclipse

    I need Eclipse IDE for C/C++ Developers. It can be found here.

  2.4 unpack

    tar -xvf <Eclipse archive.tar.gz>
    There is no install procedure. Just change directory to unpacked Eclipse folder and run ./eclipse

   2.5 *checkpoint*: build trivial C++ project



3. Connect Eclipse with wxWidgets.

  3.1 set project options

  • navigate Project > Properties > C/C++ Build > Settings > Tool Settings 
  • add to C++ Compiler > Command line pattern following string `wx-config --cxxflags`
  • add to C++ Compiler > Includes path to wxWidgets/include folder
  • add to C++ Linker > Command line pattern following string `wx-config --libs`

  3.2 *checkpoint*: build 'minimal' sample application from Eclipse

 

After all this steps I got Linux system with installed wxWidgets and Eclipse IDE.

Tuesday, May 8, 2012

about wxWidgets install

In this post I speak about common questions of installing wxWidgets.

Installing wxWidgets can be confusing for newcomers from Windows systems but it quite easy for them who knows how to install software from sources at Linux systems. Main difficult is that you should compile wxWidgets libraries by yourself. Common process of install is something like this:
  1. Download wxWidgets sources.
  2. Unpack sources.
  3. Build wxWidgets from sources.
  4. Configure IDE if you use it.
It's easy. But at Windows systems you have to make step 0 - install building tool - MinGW.

In next post I'll describe how I installed wxWidgets at Linux system.

Thursday, May 3, 2012

about wxWidgets

There are several ways to create GUI application based on C++. One of them is wxWidgets.
In short,  wxWidgets is a C++ library to create cross-platform GUI applications.

Here I put some main features of this library:
  • native look and feel for every platform
  • license allows to create GPL and proprietary applications
  • small size of library/application
  • additional auxiliary classes
  • it is quite popular among developers

You can read some info about this library at official project site or wikipedia page.
You can compare wxWidgets with other toolkits and with Qt.
You can even get to know why you shouldn't use wxWidgets.

There are a lot of tasks where wxWidgets is right tool.
I used this tool to create my first C++ GUI application - notes455:
notes455 running on Windows...

    ...and on Linux