//
you're reading...
Tech

Compile and Configure wxWidgets (based on Visual Studio 2008)

Compiling and configuring wxWidgets has never been easy. But don’t worry finally we can always get it done. Vamos!

1. Download wxWidgets

In the download page of wxWidgets, you can find the latest/most-stable version.

2. Compile wxWidgets

It would always be convenient to set the directory (sth like “C:\xc\wxWidgets-2.8.10\”) of the wxWidgets as one of the Environment Variables (how). Suppose we have set it as “WXWIDGETS”.

Open the directory of your downloaded package and browse to $(WXWIDGETS)\build\msw.  Open wx.dsw. Then do the following before you build them:

  • Set the compile type as Unicode Debug.

Snapshot of compile types

  • In menu Build, select Batch Build. Then select all the files and build them.

It should be noted that there might be errors during the build (one possibility is that multithreading breaks the dependencies between files). And currently the best way to do it is to rebuild it…

3. Configure on first-time use

After compilation, open your VS and go to Tools Options Projects and Solutions VC++ Directions,

  • In Include files, add $(WXWIDGETS)\include and $(WXWIDGETS)\include\msvc.
  • In Library files, add $(WXWIDGETS)\vc_lib

Then get down to your first program. You can find the hello-world program from here.

Create a new Win32 Console Application (how?!). In the coming dialog, select Windows application as the Application Type and Empty project as the Additional options.

Create a .cpp file, maybe using the hello-world sample.

In menu Project, select Properties. Normally we start our project in the following setting (not the unique solution): in the LinkerInputAdditional Dependencies, add these: wxbase28ud.lib wxmsw28ud_core.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib oleacc.lib.

Linker-Input-Additional Dependencies

Hopefully you can build your first program now. If there are still errors, don’t worry because that’s perfectly normal. Ping me via My Email Address. Maybe I still remember how to tackle them.

Advertisements

About Xiang 'Anthony' Chen

Making an Impact in Your Life

Discussion

Trackbacks/Pingbacks

  1. Pingback: How To Use OpenGL In wxWidgets? « Xiang Chen's Blog - April 23, 2010

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Twitter Updates

%d bloggers like this: