codeblocks setup guide - wxwiki

3
2/6/15, 07:36 CodeBlocks Setup Guide - WxWiki Page 1 of 3 https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide CodeBlocks Setup Guide From WxWiki Contents 1 Code::Blocks Wiki 2 Code::Blocks Setup Guide in Windows 2.1 Preparing Code::Blocks 3 Building wxWidgets from the command line 3.1 Downloading the last stable wxWidgets library 3.2 Building your own wxWidgets library 3.3 Copying libraries Code::Blocks Wiki Code::Blocks' wiki has a good guide on setting up wxWidgets on Code::Blocks: http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef Code::Blocks Setup Guide in Windows This page describes the steps I took in order to get Code::Blocks working with a homemade wxWidgets. I used the Code::Blocks+MINGW 1.0 bundle and wxWidgets 2.6. NOTE: This guide is for compiling with MINGW, not Cygwin nor MSYS. Preparing Code::Blocks Download Code::Blocks with the MINGW bundle from http://www.codeblocks.org Install Code::Blocks Building wxWidgets from the command line Downloading the last stable wxWidgets library The last stable wxWidgets distribution can be found at the wxWidgets website (https://www.wxwidgets.org/downloads/). You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version. If you use the plain zip version, make sure to unzip using full paths. Otherwise the directories won't be created correctly. NOTE: In the rest of these instructions I'll be calling the wxWidgets directory %WXWIN% you have to change it to your own directory. (e.g. "c:\wxWidgets-x.x")

Upload: beny-abdou

Post on 17-Nov-2015

27 views

Category:

Documents


4 download

DESCRIPTION

guide d'installation de l'interface de de l'environnement de développement CodeBlocks

TRANSCRIPT

  • 2/6/15, 07:36CodeBlocks Setup Guide - WxWiki

    Page 1 of 3https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide

    CodeBlocks Setup GuideFrom WxWiki

    Contents1 Code::Blocks Wiki2 Code::Blocks Setup Guide in Windows

    2.1 Preparing Code::Blocks3 Building wxWidgets from the command line

    3.1 Downloading the last stable wxWidgets library3.2 Building your own wxWidgets library3.3 Copying libraries

    Code::Blocks WikiCode::Blocks' wiki has a good guide on setting up wxWidgets on Code::Blocks:http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

    Code::Blocks Setup Guide in WindowsThis page describes the steps I took in order to get Code::Blocks working with a homemade wxWidgets. Iused the Code::Blocks+MINGW 1.0 bundle and wxWidgets 2.6.

    NOTE: This guide is for compiling with MINGW, not Cygwin nor MSYS.

    Preparing Code::Blocks

    Download Code::Blocks with the MINGW bundle from http://www.codeblocks.orgInstall Code::Blocks

    Building wxWidgets from the command line

    Downloading the last stable wxWidgets library

    The last stable wxWidgets distribution can be found at the wxWidgets website(https://www.wxwidgets.org/downloads/). You can choose between an installer and a zip file. You can just getthe zip file because the installer is also a zipped version.

    If you use the plain zip version, make sure to unzip using full paths. Otherwise the directories won't be createdcorrectly.

    NOTE: In the rest of these instructions I'll be calling the wxWidgets directory %WXWIN% you have tochange it to your own directory. (e.g. "c:\wxWidgets-x.x")

    https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide#Code::Blocks_Wikihttps://wiki.wxwidgets.org/CodeBlocks_Setup_Guide#Code::Blocks_Setup_Guide_in_Windowshttps://wiki.wxwidgets.org/CodeBlocks_Setup_Guide#Preparing_Code::Blockshttps://wiki.wxwidgets.org/CodeBlocks_Setup_Guide#Building_wxWidgets_from_the_command_linehttps://wiki.wxwidgets.org/CodeBlocks_Setup_Guide#Downloading_the_last_stable_wxWidgets_libraryhttps://wiki.wxwidgets.org/CodeBlocks_Setup_Guide#Building_your_own_wxWidgets_libraryhttps://wiki.wxwidgets.org/CodeBlocks_Setup_Guide#Copying_librarieshttp://wiki.codeblocks.org/index.php?title=WxWindowsQuickRefhttp://www.codeblocks.org/https://www.wxwidgets.org/downloads/

  • 2/6/15, 07:36CodeBlocks Setup Guide - WxWiki

    Page 2 of 3https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide

    Building your own wxWidgets library

    Before anything, add the bin directory of MinGW under the CodeBlocks installation directory tothe %PATH% variable. Now it is time to compile wxWidgets, open the command promt and change to thewxWidgets directory:

    cd %WXWIN%\build\msw

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

    mingw32-make.exe -f makefile.gcc clean

    NOTE: if you still have problems with compiling after cleaning, you may want to remove the directory in thebuild\msw directory. (it contains object files...) When everything is clean we can compile wxWidgets:

    First we have to configure the build. If your makefile.gcc (in my version on line 7) includes config.gcc, yourcommand line parameters will be overriden by the config-file. Thus edit the compiler settings in config.gcc toreflect your choice. The following are recommended: USE_XRC=1 SHARED=1 MONOLITHIC=1BUILD=release UNICODE=0

    Otherwise, you can build wxWidgets from the commandline as follows:

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

    Now you can get a cup of coffee, or do something else, because this could take a long time.

    NOTE: If you mess up and want to clean, you have to pass the same parameters to make clean.

    Example for clean commandline:

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

    So now everything is compiled for using codeblocks.

    Copying libraries

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

    So first we create a directory this could be done in %WXWIN%\lib.Then we go to the directory %WXWIN%\lib\gcc_dll (could called diffrent when you changed the buildoptions)Rename the directory %WXWIN%\lib\gcc_dll to the directory of your choice. (For me itis %WXWIN%\lib\gcc_dllNonUnicode)

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

  • 2/6/15, 07:36CodeBlocks Setup Guide - WxWiki

    Page 3 of 3https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide

    Congratulations! You just finished with the setup of wxWidgets library and you can start developing inwxWidgets. If any problem occurs, just ask at the Code::Blocks forum (http://forums.codeblocks.org/).

    Retrieved from "https://wiki.wxwidgets.org/index.php?title=CodeBlocks_Setup_Guide&oldid=10177"

    This page was last modified on 18 September 2014, at 10:59.This page has been accessed 198,970 times.

    http://forums.codeblocks.org/https://wiki.wxwidgets.org/index.php?title=CodeBlocks_Setup_Guide&oldid=10177