[转]CodeBlocksWxWizardGCC

Purpose

This document describes the procedure to use the Code::Block IDE to make a wxWidgets project using MinGW gcc 3.4.5 to compile it. It assumes you have followed the Code::Blocks IDE setup tutorial.

Steps

  1. Open Code::Blocks.
  2. Select File->New->Project from the menu.
  3. In the dialog that opens select wxWidgets Application and click the 'Go' button.
  4. A "wxWidgets Application" wizard will open and give you a description page. Read it and then click 'Next'.
  5. Enter your desired 'Project title'.
    Project title: wxHelloWorld
  6. Enter your desided location for the project files.
    Folder to create project in: C:\devel\programs
  7. The rest of the details will fill in automatically, but you can feel free to fill in more details if you like. Click 'Next' to go to the next screen.
  8. It asks for the location of the wxWidgets library. By default it puts $(#wx) as the location. I know it looks funny, but I suggest leaving it. The $(#sometext) syntax is Code::Blocks' way of doing Global Variables. Click 'Next' and continue.

    (More information: Using Global Variables is a good way to make your project portable. When the project it loaded and your install of Code::Block doesn't have a particular Global Variables define it will ask you for it. Kinda nice, huh?)
  9. This page wants you to select the compiler you want to use for building the project and the configurations you want to create. Choose 'GNU GCC Compiler'. Leave the rest of the settings alone until you learn a bit more about how you prefer your project to build. Click 'Next' and continue.
  10. This page lets you fine tune the libraries you are going to use to build your application. Leave the settings as they came by default. See the list below for the exact setting used.

    Use wxWidgets DLL: Checked
    wxWidgets is built as a monolithic library: Checked
    Enable Unicode: Checked (see below)
    Use the debugging libraries: Un-Checked
    Configuration: <blank>
    Create and use precompiled header (PCH): Checked

    Click 'Finish' to create your project files.

    (More information: Note for the Unicode checkbox, if you are going to use this you should know that your application will only run on Windows 2k and Windows XP.)
  11. You might get a warning saying:
    A matching configuration cannot be found in the wxWidgets directory you specified. This means that your project will not build. Do you want to continue with these settings?

    Select Yes.

You are done! You can now build and run.

 

原文地址:https://www.cnblogs.com/loongfee/p/2266997.html