LinuxKDevelop

team bbl


KDevelop, a subproject of the KDE desktop environment, is arguably the most robust, mature, and stable IDE for developing applications on Linux. Not only does KDevelop provide a powerful editor, but it also generates and updates your makefiles for you, saving you a considerable amount of work. You only need to add a few settings to KDevelop's project settings for it to compile your wxWidgets application.

1.

Create a New Project (from the Project menu).

2.

Expand C++ and choose Simple Hello World Program or some other minimal project setting. Some newer versions of KDevelop have a wxWidgets project option, but it is not as reliable or as flexible as setting up the project yourself. Finish creating the project in a place of your choosing.

3.

Delete any source files created by KDevelop, most likely a simple source file with a main and little else.

4.

Open the Project Options from the Project menu and select Configure Options from the pane of options on the left. You should see several tabs, including General, C, and C++.

5.

Click on the C++ tab. Paste the results of using wx-config --cxxflags from the command line (see the later section "Using wx-config"), clearing any options that may already be present. These flags are the necessary header includes and defines to build your wxWidgets application.

6.

Click on the General tab. Paste the results of using wx-config --libs from the command line. These are the necessary libraries for linking wxWidgets as well as linking the necessary X11, GTK+, and other system libraries.

7.

After clicking OK to close the project options dialog, KDevelop will prompt you to re-run configure for this build configuration. Although this is a necessary step later, do not run configure yet.

8.

You can now add your wxWidgets source files to the project. You will need to add at least one source file to the project before proceeding to the next step. You can add sources by using the Automake Manager tab. If you haven't written any code yet, begin your application and then come back to these steps, even if you only write a skeletal program that has a wxApp class and little else.

9.

Run automake by selecting Run Automake & Friends from the Build menu.

10.

Run configure by selecting Run Configure from the Build menu.

11.

You can now build your wxWidgets application. As your application grows, simply add the new files using the Automake Manager, and KDevelop will automatically update the makefiles.

KDevelop allows you to create multiple build configurations. By default, configurations named "debug" and "optimized" are created. If you want to be able to create both debug and release versions of your application, you can place the wx-config flags specifying the different library configurations into separate KDevelop configurations, giving you the flexibility of choosing to build a debug or a release simply by switching your configuration from within KDevelop.

    team bbl



    Cross-Platform GUI Programming with wxWidgets
    Cross-Platform GUI Programming with wxWidgets
    ISBN: 0131473816
    EAN: 2147483647
    Year: 2005
    Pages: 262

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net