If you want to do a quick evaluation of the
cross-platform GUI library wxWidgets using Microsoft Visual C compilers, you are in the right place. I've been testing wxWidgets with Visual C++ 6.0 and 2005 Express Edition for the last days and this is my log while things are still fresh.
To begin with, check your box. wxWidgets is open-source, you can
download it from the project site. Visual C++ is a very reliable tool, and
the Express Edition is free. If you need to pull any of these from the web, begin and read some more while in it:
Microsoft Visual C++ 2005 Express Edition is tailored for .NET development and wxWidgets uses Windows APIs. You have to
download the 2003 Platform SDK to get things working, add it to the downloads list if you need. My VC Express did not recognize the SDK after I install it under the Program Files folder, but
it was welcome as $(VCInstallDir)PlatformSDK (that can be …\MSVS8\VC\PlatformSDK).
Why use wxWidgets? With Linux's increasing popularity among desktop users you may want to create
cross-platform programs, and then you have three kinds of approaches: using a scripting language like Python, a virtual machine like Java, or making specific binaries for each operating system; wxWidgets helps you with the last choice.
There are reasons to select the last approach, you can
read some at the wxWidgets wiki (opinions may be a little biased). In my opinion the main reasons to make specific binaries are run-time speed and seamless integration. Run-time speed may not be critical, the best way to cut execution time is with better analysis of the problem. Seamless integration
is critical for wide audiences, most end-users dont feel comfortable without the usual interface.
Still downloading?
Play a flash game from lazylaces.
Done? Start install, play another!
wxWidgets is a framework that has to be compiled, and there are huge libraries to build: the core library depends on more than 200 objects. Case you want to play other flash game, build all libraries using the …\wxWidgets\build\msw\wx.dsw workspace, after selecting a configuration like Unicode Debug. Otherwise use a build-as-need approach, following the title of this post (at least with the compiler previously installed).
Quick pathOpen the …\wxWidgets\samples\minimal\minimal.dsw workspace, select a minimal configuration and start build. You can finish the current flash game, the build will take some time to create base and core libraries. At the end you can get a
fatal error: cannot open input file 'wxtiff.lib'. There are some libraries to be linked that are not used at all: go to Project Settings / Properties and remove wxtiff.lib thru wxexpat.lib from link. This does not happen if you build all the libraries in advance.
Other errors may arise, see my short list at the end of this post.
When you have the minimal project built, remove or unload the base and core projects. If you open other samples, immediately remove or unload all wxWidgets projects that you have already built. That will save a lot of time when you reopen the projects with VC6, and prevents starting of base / core builds if you dont set the proper configuration.
Errors found [6] is VC6, [8] is VCExpressCannot open include file: 'windows.h' [8]
Install
2003 Platform SDK at …\MSVS8\VC\PlatformSDK
unresolved external symbol __imp__WindowsAPI@N [8]
This is a tricky one. By default VCExpress only inherits kernel32.lib; edit …\MSVS8\VC\VCProjectDefaults\corewin_express.vsprops (it is xml) and add other libraries (copy from CoreWin.vsprops).
Cannot open input file 'wxtiff.lib' [6][8]
Remove wxtiff.lib thru wxexpat.lib from Project Settings / Properties : Link
Slow workspace open, hangups [6]
Remove or unload all wxWidgets projects that you have already built.
Duplicate resource. Type:MANIFEST, name:1 [8]
This happens if you have been playing with VC6 and convert a project to VCExpress. The last embeds a manifest inside the executable; with VC6, the manifest is embeded by wxWidgets framework; and you end with a duplicated resource. Just remove all rcdefs.h from …\wxWidgets\lib\vc_lib sub-folders, they will be recreated.
Etiquetas: wxWidgets