Build wxWidgets applications in Ubuntu
2015-09-29 12:25
477 查看
今天准备把原来的项目迁移到ubuntu下,之前用到的wxWidgets库一直装不上,后来查了相关资料才解决了问题,这里分享一下安装的
版本号记得替换一下,比如 安装wxWidgets3.0.2 需要 libxgtk3.0-dev 等
在教程中有个地方挺坑的
$(shell wx-config --cxxflags)
这个是一个EL表达式,表示取shell中运行 wx-config --cxxflags 的结果值
wx-config 是在wxWidgets的根目录下
转自http://www.cppblog.com/xcpp/archive/2010/01/06/build_wx_app_with_codelite_in_ubuntu.html
Today I spent 5+ hours in this problem so I think it is worth to write down my experience here...
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 is becoming
more and more user friendly today. So I tried to build an application with CodeLite (2.1.3584) in Ubuntu (9.10).
I tried to build a wxWidgets application in Windows before. According to this article the
thing is quite easy. However, I didn't expect it is so difficult to do the same thing in Linux (simply because I can't find a similar article on Internet). I googled again and again but didn't find much stuff 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.
版本号记得替换一下,比如 安装wxWidgets3.0.2 需要 libxgtk3.0-dev 等
在教程中有个地方挺坑的
$(shell wx-config --cxxflags)
这个是一个EL表达式,表示取shell中运行 wx-config --cxxflags 的结果值
wx-config 是在wxWidgets的根目录下
转自http://www.cppblog.com/xcpp/archive/2010/01/06/build_wx_app_with_codelite_in_ubuntu.html
Today I spent 5+ hours in this problem so I think it is worth to write down my experience here...
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 is becoming
more and more user friendly today. So I tried to build an application with CodeLite (2.1.3584) in Ubuntu (9.10).
I tried to build a wxWidgets application in Windows before. According to this article the
thing is quite easy. However, I didn't expect it is so difficult to do the same thing in Linux (simply because I can't find a similar article on Internet). I googled again and again but didn't find much stuff 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.
相关文章推荐
- Android如何设置TextView的行间距、行高。
- cocos2dx-lua 笔记 >使用json作为配置文件
- iOS 9学习系列:上手SFSafariViewController
- android数字签名相关命令
- Android最火框架XUtils的使用详解
- 微信音乐回复时出现“链接无效,无法播放”的情况
- iOS开发实习期间get的技巧
- 'tools.jar' seems to be not in Android Studio classpath----Android Studio启动时问题
- Android M 新的运行时权限开发者需要知道的一切
- iOS 9适配技巧(更新版)
- Android基础入门教程——2.5.2 Notification(状态栏通知)详解
- Android绘图机制(四)自定义控件
- AutoMapper使用
- iOS开发-图片加载优化
- 【Android开源项目分析】android轻量级开源缓存框架——ASimpleCache(ACache)源码分析
- Could not load the assembly 'App_Web_cwclgcuu'. Make sure that it is compiled before accessing the page.
- 自定义雷达扫描的实现
- 使用百度地图API
- [IOS]从零开始搭建基于Xcode7的IOS开发环境和免开发者帐号真机调试运行第一个IOS程序HelloWorld
- APP留存技巧,请给用户一个打开app 的理由