linux下codelite使用教程,codelite 在 ubuntu linux 中的安装和使用

linux下的c++开发?用codeblocks或codelite吧!

不过codelite在linux下的安装稍微有些麻烦,如果安装方法不对,那么codelite的IDE编译项目时会报错。下面转一个ubuntu下安装codelite的方法。

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

最好是采用后面的安装方案,这样所需的改动最小,并且也还安装了 wxwidget的调试库。

codelite安装完成并能够调试编译程序之后我们就可以用wxwidget库来开发linux下的gui程序了,但是这还不够,我们希望能够有像vc那样的可以通过拖放来设计界面的便利,那就安装wxformbuilder吧,通过wxformbuilder的自动代码生成功能,我们可以很方便的设计出界面来。

terminal 中一行命令搞定!

sudo apt-get install wxformbuilder

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值