cr_itm wrote:I must admit, I don't understand the whole architecture of wxWidgets. I mean, after I compile the libs, why aren't they in the lib folder (they are in the "lib/vc_lib/" folder)? How can I create one single lib - or more important, how can I get the samples work with those several small lib files?
(I also had problems creating my own project without the single big lib file, but thats another issue, I first want to understand this thing with the libs...)
The reason for the individual subfolders in lib is because wxWidgets can be built a number of different ways so placing them in separate folders prevents different builds for conflicting with one another.
The samples should all just work. Open up their workspace and do a Build Solution.
If I remember correctly, wxmsw.lib is from the 2.4.x series. 2.5.x+ (including 2.6.0) all break the library up into several smaller libraries (then you can pick and choose what you want to link to more easily).
Here is what a Debug build of one of my application links to for wxWidgets 2.6.0:
wxmsw26d_adv.lib wxmsw26d_html.lib wxmsw26d_core.lib wxmsw26d_qa.lib wxbase26d.lib wxbase26d_xml.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib
You may not need all of those libraries. For a release build, link to the same except removing the trailing "d" in each of the libraries.
The best way I've found to setup wxWidgets with your own projects is to create an environment variable called something like WXDIR which contains the path to wxWidgets (e.g. "C:\wxWidgets-2.6.0"). Then, in your MSVC Tools | Options window, add to Projects > VC++ Directories in the Library files section "$(WXDIR)\lib\vc_lib" and "$(WXDIR)\include" to Include Files section. Then, in your project settings in the C/C++ > General section add "$(WXDIR)\lib\vc_lib\mswd" to your Additional Include Directories field for debug builds and "$(WXDIR)\lib\vc_lib\msw"; for release builds (this is to specify where the setup.h for the particular library you are linking to is at). Then, when upgrading or switching to a new version of wxWidgets, you only have to change that environment variable and everything just works and for someone else to use your project, all they have to do is add a WXDIR environment variable which makes this method very useful for multiuser projects. Also, it minimizes the setup needed to start a new project since all you need to do now is add those extra include directores and the library names.