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.

No comments:

Post a Comment