Creating CodeLite projects for wxWidgets applications

From WxWiki
Jump to: navigation, search

CodeLite is a free IDE for C++ development.

How to create a CodeLite project for wxWidgets development on Mac OS X:

  • Create a workspace if you haven't already done so
  • Create a new project using menu Workspace >> New Project
  • In category GUI, choose Executable (wxWidgets enabled) and enter a project name then click OK

Cl wizard.png

  • If you don't wish to use the default wxWidgets build that comes with MacOS X :
    • Right-click on your project and select Settings
    • Under Compiler, change C and C++ options to use the wx-config from your build
    • Do the same thing for Linker flags

Cl wxconfig.png

    • Repeat these steps for both debug and release targets
  • Unless you wish to make a wxWidgets powered console application, right-click on the project and select Make this project output a bundle

Cl bundle.png

    • Select both Debug and Release targets; enter the information on your application and click Apply changes
  • On mac OS X 10.6, GCC will build 64-bits by default. If you have a 32-bits wxWidgets build, you need to tell GCC to build 32-bits :
    • Right-click on your project and select Settings'
    • Under Compiler, change C and C++ options to add "-arch i386"
    • Do the same thing under linker flags

Cl archflags.png

  • You are now ready to build and run the application!