zoukankan      html  css  js  c++  java
  • Build wxWidgets applications with CodeLite in Ubuntu

    I just started to play with Linux and the open source C++ IDE CodeLite.The IDE and wxWidgets library looks great, and the Linux platform isbecoming more and more user friendly today. So I tried to build anapplication with CodeLite (2.1.3584) in Ubuntu (9.10).

    I tried to build a wxWidgets application in Windows before. According to this articlethe thing is quite easy. However, I didn't expect it is so difficult todo the same thing in Linux (simply because I can't find a similararticle on Internet). I googled again and again but didn't find muchstuff useful.

    Here is instructions I used:

    1. Install wxWidgets package: sudo apt-get install libwxgtk2.8-dev

    2. Install build essentials package: sudo apt-get install build-essential

    3. Create a link for "/usr/include/wx-2.8/wx" to "/usr/include/wx", or copy the directory over

    4.Create a link for"/usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h" to"/usr/include/wx/setup.h", or copy the file over

    5. Open CodeLite IDE, create a project using wxWidgets template

    6. Modify the default project settings to:
    complier options: -g;$(shell wx-config --cxxflags)
    linker options: -mwindows;$(shell wx-config --libs)

    7. Complie and run


    Without step 6 you may see following errors:

    No config found to match: /usr/bin/wx-config --cxxflags --unicode=yes --debug=yes in /usr/lib/wx/config

    No Target! You should use wx-config program for compilation flags!

    It's because there is no debug library exists in /usr/lib/wx/config. By default there is only release+unicode builds.

    It is actually so easy. I didn't do it in a right way. Now I believe the right process should be following the instructions here.

    For a simplified guild:

    1. sudo apt-get install build-essential
    2. sudo apt-get install libwxgtk2.8-dev libwxgtk2.8-dbg
    3. sudo ln -sv /usr/include/wx-2.8/wx /usr/include/wx
    4. Create a wx project in CodeLite, build and run with default settings. It should just works

  • 相关阅读:
    ABAP 程序中的类 沧海
    ABAP类的方法(转载) 沧海
    More than 100 ABAP Interview Faq's(2) 沧海
    SAP and ABAP Memory总结 沧海
    ABAP Frequently Asked Question 沧海
    ABAP System Reports(Additional functions) 沧海
    ABAP Questions Commonly Asked 1 沧海
    ABAP Tips and Tricks 沧海
    ABAP System Fields 沧海
    ABAP 面试问题及答案(一):数据库更新及更改 SAP Standard (转) 沧海
  • 原文地址:https://www.cnblogs.com/chinacloud/p/1775479.html
Copyright © 2011-2022 走看看