Code:Blocks and MinGW Configuration and Projection Integration based on WXWidget2.9.1
来源:互联网 发布:淘宝订单怎么申请退款 编辑:程序博客网 时间:2024/05/21 15:48
First of ALL, i record this documents for the begginer of the Code:blocks and Mingw or GCC compliant compiler..
And also the people who eager to share in the open community and cross platform development.
Before you said that hard, please know the following common reality about the C: B. & WXwidget
1.WXwidget need compiler before you start your hello world, please download the newer or stable wxwidget version from
http://www.wxwidgets.org/
and there a forum to help you indentify some issues.
but please read the documents about the compiling issue in the <yourwxwidget>/docs/msw/install.txt.
following the command can help you on various compiler.
2.C:B suggest to get a binary build from http://www.codeblocks.org/
Donot wait time to compile a SVN version.
There also a forum there to help you identified your questions and more efficient than the wxwidget :)
3. migrate your project from your older version wxwidget and older version C:B
there a bug, the project file cannot update to date to reflect the comipler change, if you also update the C:B version.
so you have to manually handle on the .cbp file(project file)'
here is a valid project file, if you found there strange thing happend when you try to compile the project and your
configuration is settled down, error like "prexxx.h not included,,, xxx is undefined, can not reference to xxxx".
you also can create a new widget project and compare with the older one....
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="EHProxy" />
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/EH02" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Option projectLinkerOptionsRelation="2" />
<Compiler>
<Add option="-g" />
<Add option="-D__WXDEBUG__" />
<Add directory="D:/wxWidgets-2.9.1/lib/gcc_dll/mswud" />
</Compiler>
<ResourceCompiler>
<Add directory="D:/wxWidgets-2.9.1/lib/gcc_dll/mswud" />
</ResourceCompiler>
<Linker>
<Add library="libwxmsw29ud_core.a" />
<Add library="libwxbase29ud.a" />
<Add library="libwxpngd.a" />
<Add library="libwxjpegd.a" />
<Add library="libwxtiffd.a" />
<Add library="libwxzlibd.a" />
<Add directory="D:/wxWidgets-2.9.1/lib/gcc_dll" />
</Linker>
</Target>
<Target title="Release">
<Option output="bin/Release/EH02" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="0" />
<Option compiler="gcc" />
<Option projectLinkerOptionsRelation="2" />
<Compiler>
<Add option="-O2" />
<Add directory="D:/wxWidgets-2.9.1/lib/gcc_dll/mswu" />
</Compiler>
<ResourceCompiler>
<Add directory="D:/wxWidgets-2.9.1/lib/gcc_dll/mswu" />
</ResourceCompiler>
<Linker>
<Add option="-s" />
<Add library="libwxmsw29u_core.a" />
<Add library="libwxbase29u.a" />
<Add library="libwxpng.a" />
<Add library="libwxjpeg.a" />
<Add library="libwxtiff.a" />
<Add library="libwxzlib.a" />
<Add directory="D:/wxWidgets-2.9.1/lib/gcc_dll" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-pipe" />
<Add option="-mthreads" />
<Add option="-D__GNUWIN32__" />
<Add option="-D__WXMSW__" />
<Add option="-DWXUSINGDLL" />
<Add option="-DwxUSE_UNICODE" />
<Add option='[[if (PLATFORM == PLATFORM_MSW && (GetCompilerFactory().GetCompilerVersionString(_T("gcc")) >= _T("4.0.0"))) print(_T("-Wno-attributes"));]]' />
<Add option="-Wall" />
<Add directory="D:/wxWidgets-2.9.1/include" />
<Add directory="D:/wxWidgets-2.9.1/contrib/include" />
</Compiler>
<ResourceCompiler>
<Add directory="D:/wxWidgets-2.9.1/include" />
</ResourceCompiler>
<Linker>
<Add option="-mthreads" />
</Linker>
<Unit filename="EHProxyApp.cpp" />
<Unit filename="EHProxyApp.h" />
<Unit filename="EHProxyMain.cpp" />
<Unit filename="EHProxyMain.h" />
<Unit filename="OptionDialog.cpp" />
<Unit filename="OptionDialog.h" />
<Unit filename="resource.rc">
<Option compilerVar="WINDRES" />
</Unit>
<Unit filename="wx_pch.h">
<Option compile="1" />
<Option weight="0" />
</Unit>
<Unit filename="wxsmith/EHProxyframe.wxs" />
<Unit filename="wxsmith/OptionDialog.wxs" />
<Extensions>
<code_completion />
<debugger />
<wxsmith version="1">
<gui name="wxWidgets" src="EHProxyApp.cpp" main="EHProxyFrame" init_handlers="necessary" language="CPP">
<load_resource file="OptionDialog.xrc" />
</gui>
<resources>
<wxFrame wxs="wxsmith/EHProxyframe.wxs" src="EHProxyMain.cpp" hdr="EHProxyMain.h" name="EHProxyFrame" language="CPP" />
<wxDialog wxs="wxsmith/OptionDialog.wxs" src="OptionDialog.cpp" hdr="OptionDialog.h" xrc="OptionDialog.xrc" fwddecl="1" name="OptionDialog" language="CPP" />
</resources>
</wxsmith>
</Extensions>
</Project>
</CodeBlocks_project_file>
4. open the detail compiler and linker cmd..
Settings->compiler and debugger->Global compiler settings->other setting->compiler logging->full command line(drop list)
5.configure your wxwidget envrionment variable..
Settings ->global variables setting->create a new wx, and fullfill the proper directory path...
6.compile your project , older gui displaed, oh, yeah!
- Code:Blocks and MinGW Configuration and Projection Integration based on WXWidget2.9.1
- Summary on 20080710: union and projection search by QBC
- Viewing and Projection
- projection and view matrices
- MinGW-w64 and msys install on windows
- GPIO mux and configurations based on msm
- chat function based on pthread and ipc
- MinGW Code::Blocks 运行 winsock
- Code::blocks + OpenMP using minGW
- Dovecot installation and configuration on CentOS
- PCL Installation and Configuration on OSX
- Introduction and Configuration SharePoint 2013 Forms Based Authentication
- QT setup based on MinGW
- OPC AND DCOM CONFIGURATION ON WINDOWS 2008 AND WINDOWS 7
- Code-Based Configuration (EF6 onwards)
- Integration between SharePoint 2013 and CRM 2013 (On-Premise)
- Isometric View and Isometric Projection
- Projection Matrix and Linear Regression
- C#委托
- IBM Rational Team Concert 3.0 11月23号发布
- 架构师给程序员的一封信
- C标准库函数浅析
- STM32学习(二)——MDK3 工程配置
- Code:Blocks and MinGW Configuration and Projection Integration based on WXWidget2.9.1
- 调用API右下角弹窗
- 计算机系统结构类最优秀的导论型作品——深入理解计算机系统(第二版)
- jboss 自动启动关闭时关闭dos窗口
- STM32学习(三)——库文件添加
- 水晶報表分頁與空行
- RenderPartial性能优化
- 如何从Eclipse中恢复删除的cvs文件
- 利用Java-JACOB操作WORD文档2