Chinaunix首页 | 论坛 | 博客
  • 博客访问: 8609083
  • 博文数量: 1413
  • 博客积分: 11128
  • 博客等级: 上将
  • 技术积分: 14685
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-13 10:03
个人简介

follow my heart...

文章分类

全部博文(1413)

文章存档

2013年(1)

2012年(5)

2011年(45)

2010年(176)

2009年(148)

2008年(190)

2007年(293)

2006年(555)

分类: C/C++

2006-08-24 10:01:04

Check make version

If you didn't install MingW yourself you have to make sure you have the right version of make. Open the command prompt and type:

mingw32-make -v 

If the version is 3.80 or greater it is allright to go on, else you have to install the new make.

Building wxWidgets

Now it is time to compile wxWidgets, open the command promt and change to the wxWidgets directory:

cd \build\msw

NOTE: The following directions do not work with msys, or other forms of Unix on windows.

Regaurding warning: type attributes are honored only at type definition:
the warnings are because the makefile turned all warnings on... you can easily edit it at ur wishes -lowjoel (Moderator wxWidgets forum)

Now we are on the right place we are first going to clean up the source:

mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 clean  

NOTE: make sure you use the same options to clean that you use for the build step below. the clean target uses these environment variables and only cleans that version of the generated object and library files (so it will actually not clean the intended files if these variables are not present)
NOTE: if you still have problems with compiling after cleaning, you may want to remove the directory in the build\msw directory. (it contains object files...) When everything is clean we can compile wxWidgets:

mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 

NOTE: these options are the official Code::Blocks options. When you want another version of wxWidgets (unicode or debug) you have to make sure you build a MONOLITHIC version. (One big dll) Now you can get a cup of coffee, or do something else, because this could take a long time.

Copy libraries

When compilation is finished it is usefull to copy the libs to another directory. By doing this you can make several builds (e.g. debug and release).

  • So first we create a directory this could be done in \lib.
  • Then we go to the directory \lib\gcc_dll (could called diffrent when you changed the build options)
  • Now we move all the files (.a .dll) and the directory (msw) to the directory of your choice. (for me it is \lib\codeblocks)

NOTE: Make sure you everything is removed from the directory \lib\gcc_dll else you can get trouble when compiling another version.

Setting up paths

Everything is done now, and we can start compiling Code::Blocks, couldn't we? No! First we have to setup the paths. Open the codeblocks project (CodeBlocks-wx2.6.0.cbp) and go to the Build options. From there you have to go to the tab Directories and Compiler. Here you have to add the following paths (Remember to replace )

  • \lib\codeblocks\msw
  • \include
  • \contrib\include

The first path is used to find the right setup.h for the build you are using. The other two are for the normal include files.

Now go to the Linker tab and add the following path:

  • \lib\codeblocks

NOTE: You have to replace this with the directory of your own choice in the previous section!

Finally, go to the resource tab and add the following path (Remember to replace )

  • \include

Now you are finished with the configuration and you can hit the compile button (CTRL-F9). Be aware that Code::Blocks does not officially support wxWidgets 2.6.1 so it is possible that new files are not yet in the project. You have to do this by yourself.

阅读(1688) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~