Build Report: Visual C++ 2008 Express & wxWidgets 2.8.6 Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
HerbThompson
In need of some credit
In need of some credit
Posts: 5
Joined: Thu Nov 10, 2005 1:51 am
Location: Canada

Build Report: Visual C++ 2008 Express & wxWidgets 2.8.6

Post by HerbThompson »

For those who are thinking about trying the newly released Visual C++ 2008 Express Edition with wxWidgets, I installed it today and successfully built the wxWidgets libraries and samples. The main caveat is that, unlike the 2005 version, the 2008 version will not produce executables that will run on Windows 98 (not even command line apps), so if you need to target an old version of Windows, you'll want to keep the 2005 version around.

I did not use the web install. I downloaded the DVD iso which contains all of the express products (VB etc), a subset of the platform SDK (no need to download and install this separately as was the case for the 2005 version), and some optional MSDN documentation.

A synopsis of my installation experience follows. YMMV

1. Downloaded the installation DVD iso from http://www.microsoft.com/express/vc.

2. Burned the DVD using ImgBurn from http://www.imgburn.com/.

3. The DVD auto ran. Selected the C++ install. Accepted the defaults. It took a while.

4. Once the install was complete, ran the IDE once so it could initialize itself. (Start -> All Programs -> Visual C++ 9.0 Express Edition -> Microsoft Visual C++ 2008 Express Edition)

5. Since a rebuild of wx for the new VC libraries was required, I took the opportunity to upgrade from 2.8.5 to 2.8.6. I downloaded wxMSW-2.8.6-Setup.exe, ran it, and let it install in the default directory (wxWidgets-2.8.6).

6. To build the newly installed version of wx with the newly installed VC, I used the command line. (Start -> All Programs -> Visual C++ 9.0 Express Edition -> Visual Studio Tools -> Visual Studio 2008 Command Prompt)

7. From the Visual Studio 2008 Command Prompt:
C:\wxWidgets-2.8.6\build\msw>nmake -f makefile.vc BUILD=debug
C:\wxWidgets-2.8.6\build\msw>nmake -f makefile.vc BUILD=release

8. I built all of the samples in debug mode:
C:\wxWidgets-2.8.6\samples>nmake -f makefile.vc BUILD=debug

9. Note that the mfc sample won
imekon
Earned a small fee
Earned a small fee
Posts: 10
Joined: Tue Jan 16, 2007 3:41 pm

Post by imekon »

I rebuilt an application I've created with wxWidgets and DialogBlocks with Visual Studio Express 2008. I rebuilt the wxWidgets library by loading the project into Visual Studio and building just the debug/release static versions (not Unicode).

Then I built my application (I set up the include paths etc. myself) and it built fine. It seems to run fine, but all my menus (except one) are messed up.

Since the one working menu doesn't have bitmaps on it, I created a quick app in DialogBlocks with one menu, and it worked fine (this time using your property sheet). As soon as I added bitmaps (XPM or BMP), the menu is messed up again.

Not sure if its my build issue or something else. I should try your setup next and Unicode and see if the issue still remains.
jak352
In need of some credit
In need of some credit
Posts: 1
Joined: Fri Apr 25, 2008 2:16 pm

Using Visual C++ 2008 Express

Post by jak352 »

Hi,

I was fighting with the include directories for ages until I read this excellent post. The fourth last line of the properties sheet should be Value=“C:\CPP\wxWidgets-2.8.7” for me as I've installed an even newer version of wxWidgets and happened to put it in my CPP directory. Thanks for the post Herb.

Cheers, Jonathan
daddydave
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 214
Joined: Wed Jun 15, 2005 3:31 am
Location: United States
Contact:

Post by daddydave »

I'm glad this was posted as well, although I haven't had a chance to try it. A lot of the other existing information is either out of date or relates to the full Visual Studio. I linked to this post from wxWiki.
aikudo2000
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Jun 19, 2008 8:33 pm

thank you

Post by aikudo2000 »

oh my god! it actually works! I tried countless tutorials from the wiki and info from other places. So far this is the only howto that work with vs2008 express. Many many thanks.
James Little
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Jul 09, 2008 6:57 am

Post by James Little »

Many thanks! No doubt this has saved me a lot of time :)
karnak
In need of some credit
In need of some credit
Posts: 1
Joined: Fri Oct 10, 2008 7:45 pm

Post by karnak »

Thanks a lot, that was extremely helpful! It worked flawlessly
jkordani
In need of some credit
In need of some credit
Posts: 1
Joined: Tue May 05, 2009 7:56 pm

Re: Build Report: Visual C++ 2008 Express & wxWidgets 2.

Post by jkordani »

HerbThompson wrote:

Code: Select all

....
	<Tool
		Name="VCLinkerTool"
		AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib wsock32.lib"
		AdditionalLibraryDirectories=""$(wxwidgets)\lib\vc_lib""
	/>
....
I've been fighting with this for a week and a half now. This part quoted is the 2nd time I've seen it mentioned anywhere that these libs are required by wxwidgets, that they need to be explicitly stated because for some reason? they are not on any standard library path? So I wish to ask, are these libs included in your property sheet to make sure they are there? or because they aren't in any default path and need to be explicitly mentioned?

I'm getting a zillion and one linker errors trying to make up my own wxwidgets app project from scratch and its driving me nuts.
HerbThompson
In need of some credit
In need of some credit
Posts: 5
Joined: Thu Nov 10, 2005 1:51 am
Location: Canada

Re: Build Report: Visual C++ 2008 Express & wxWidgets 2.

Post by HerbThompson »

The libraries listed (comctl32.lib rpcrt4.lib winmm.lib wsock32.lib) must be specified explicitly becuase they are not part of the default list of libraries passed to the linker by VS but they are required by some of the wxwidgets libraries. (It's not about paths.)

Are you still having problems?
Post Reply