By Bryan Wu, on 六月 5th, 2009, Category: Open Source, wxWidgets
Tags: C++, Linux, Programming, Qt, Sizer, UI, windows, wxWidgets, 界面设计, 编程
个人感觉在wxWidgets UI编程时,一开始最难于理解和使用的就是Sizer,尤其是在与各种控件、Panel嵌套搭配的时候,包括对控件间隙以及父窗口大小发生改变时各个控件的变化定义等。在网上发现这篇文章非常详细的总结了Sizer, Frame和Panel的关系并通过简单的实例深入浅出地讲解了这一部分,转载在此供大家参考,如果你有相关技术问题或者开发心得也可以发评论参加讨论。
[原文如下] 最近在研究跨平台的C/C++ GUI库,基本说来功能强大,稳定且开源的库就是QT和wxWidgets了,关于他们之间具体的比较详见《WxWidgets Compared To Other Toolkits》。 N年以前研究过一段时间QT的代码,不过主要因为其在Windows开发商用软件还是要一定的license费用,所以不能说是真正的免费跨平台。 wxWidgets则是一套免费开源的跨平台C++ GUI库,它的一个特点就是可以转换为native 的api图形界面。就是说用同样的代码,在windows平台看起来就是window风格的,在X Windows平台看起来就是linux风格的。
Continue reading wxWidgets Programming: Sizer, Frame and Panel - 全文阅读
By Bryan Wu, on 六月 3rd, 2009, Category: Code::Blocks
Tags: code blocks, compiler, GCC, GNU, Linux, Mac OS X, MinGW, Visual C++, 编译器
当第一次运行CodeBlocks IDE,它会自动扫描系统寻找支持的编译器。当扫描结束时,CodeBlocks会配置检测到的编译器,甚至为那些没有发现的编译器也会包括缺省的配置。这篇文章主要是指导你如何手动获取、安装和配置CodeBlocks可以使用的编译器。以下大体上按照操作系统不同分别讨论:Windows,Linux和Mac OS X。同时包含各种编译器的主页/下载地址可以方便你直接访问。
Continue reading Code::Blocks IDE: 手动安装和配置编译器指南 - 全文阅读
By Bryan Wu, on 五月 26th, 2009, Category: C++ Programming, Code::Blocks, Open Source
Tags: C++, code blocks, cross platform, FreeBSD, LGPL, Linux, Multimedia library, SDL, windows
SDL - Simple DirectMedia Layer, is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power."
SDL supports Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64, RISC OS, SymbianOS, and OS/2, but these are not officially supported. SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, C#, D, Eiffel, Erlang, Euphoria, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, Pike, Pliant, Python, Ruby, Smalltalk, and Tcl. SDL is distributed under GNU LGPL version 2. This license allows you to use SDL freely in commercial programs as long as you link with the dynamic library. – libsdl.org
Continue reading Setting up Code::Blocks to work with SDL - 多媒体编程库 - 全文阅读
By Bryan Wu, on 五月 21st, 2009, Category: Open Source
Tags: CVS, GIT, Linux, SCM, sourceforge, Subversion, TortoiseSVN, 版本管理
在SF.net可以利用SVN进行软件版本管理,以前用过CVS和SVN,发现现在很多项目都是利用GIT进行这项工作(包括Linux)。 如果是使用SVN,客户端可以下载开源的TortoiseSVN,它也是托管在sourceforge的一个开源项目。
不过通过svn import几十兆文件到sourceforge.net速度还是真慢,而且还会出现远端断开链接的错误,只能利用代理加快速度。
Continue reading SCM: SVN or GIT 开源版本管理工具 - 全文阅读
By Bryan Wu, on 五月 11th, 2009, Category: Code::Blocks
Tags: code blocks, GPL, Linux, makefile, simulation, Skyeye, ucLinux, 编译
Bryan注:原文前面关于C::B的介绍略去,这一篇文章主要是介绍编译Skyeye的步骤。
Skyeye是一款开源的软件仿真模拟器软件,可以用于嵌入式软件的开发调试,是由中国人开发的开源项目中比较突出的一个。本文作者主要关注CB编译Skyeye的方法步骤,关于Skyeye的详细内容,大家可以Google其他网站内容。
SkyEye is an Open Source Software Project (GPL Licence). Origin from GDB/Armulator, The goal of SkyEye is to provide an integrated simulation environment in Linux and Windows. SkyEye environment simulates typical Embedded Computer Systems (Now it supports a series ARM architecture based microprocessors and Blackfin DSP Processor). You can run some Embedded Operation System such as ARM Linux, uClinux, uc/OS-II (ucos-ii) etc. in SkyEye, and analysis or debug them at source level. – Skyeye.org
使用CodeBlocks编译skyeye-1.2.5(linux系统,已安装完整的编译环境) 使用Makefile编译:
Continue reading Code::Blocks编译skyeye步骤 - 全文阅读
By Bryan Wu, on 五月 11th, 2009, Category: Code::Blocks, wxWidgets
Tags: code blocks, Debian, Linux, SVN, wxGTK, wxWidgets, 跨平台
研究跨平台开发,选择了wxWidgets和Code::Blocks搭挡,那么编译wxGTK和Code::Blocks最新的SVN版本(不选择Code::Blocks 8.02的原因是现在的SVN版本修复了8.02大量BUG,而且使用最新的SVN版本,同时报告使用中出现的问题,本身也是对Code::Blocks开发的支持)就不可避免了。 在Ubuntu下编译,两都都很顺利,但当基于Debian Lenny系统来编译时,CB却出现了问题:
codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory
就是这个错误,导致CB根本无法启动。试着把相应文件拷贝到codeblocks主程序所在的/usr/local/bin目录中(还是Windows的思维),仍然出错。经查找资料,发现此时只要把libcodeblocks.so.0所在的目录加入环境变量中就可以了。
sudo /etc/ld.so.conf #编译该文件 /usr/local/lib #将该行加入到该文件的末尾 sudo ldconfig #重新配置
这样就可以正常启动Code::Blocks了。
Continue reading Debian Lenny编译wxWidgets与Code::Blocks SVN版 - 全文阅读
Byran注: C::B下Help Plugin的介绍网址在:http://wiki.codeblocks.org/index.php?title=Help_plugin
通过这个插件,可以在编程过程中方便的访问相应的帮助文件,类似于MSDN于VS,大家不妨一试,下面是摘自另外一篇中文blog,关于Linux下配置帮助文件。
在Debian下使用Code::Blocks有一段时间了,但一直没解决如何通过F1打开帮助并查询。类似Windows的方式试过chm格式的帮助文件,但失败了。 近期研究了一下,发现:基于html格式的帮助文件可以这样来实现。
Continue reading Linux下配置Code::Blocks帮助插件 - 全文阅读
Again, today I will try to build and install the Code::Blocks, an open source and free IDE for programming, in my own openSUSE 11.1 box…;-) 1. First, I need wxWidgets supported in my openSUSE 11.1 box. In a terminal console: $ zypper search wxWidgets I got some information about it as: 正在載入儲存庫資料… 正在讀取已安裝的套件… S | 名稱 | 摘要 | 類型–+———————–+——————————————————-+———– | wxWidgets | C++ framework for cross-platform development | 套件 | wxWidgets | C++ framework for cross-platform development | srcpackage | wxWidgets-compat | WxWidgets Compatibility Package | 套件 | wxWidgets-debuginfo | Debug information for package wxWidgets | 套件 | wxWidgets-debugsource | Debug sources for package wxWidgets | 套件 | wxWidgets-devel | Include files and libraries for wxWidgets development | 套件 | wxWidgets-docs | WxWidgets html documentations | 套件 | wxWidgets-gl | OpenGL add-on for wxWidgets | 套件 | wxWidgets-gl-compat | OpenGL add-on for wxWidgets | 套件 | wxWidgets-lang | Languages for package wxWidgets | 套件 So, I decided to install some packages:
Continue reading Code::Blocks IDE in openSUSE 11.1编译和安装指南 - 全文阅读
|
|
|