Well i just tried to import the wxWidgets 2.6.1 dsw to try if it works this way but even on importing there is a lot of errors saying hat heres not enough memory for creating a thread (on an 1gb ram machine).
and the created projects have default compiler/linker settings for all targets
even in the wx_dll.dsw, all projects are seup to create only statically linked librarys.
i dont think c::b is the way to compile wx...
but the makefile too makes some trouble (that can be fixed though)
ill post just a brief howto compile here, maybe someone can make use of it:
1. get the following things
msvctoolkit 2k3[/list:u]
MS Platform SDK this one is for all windows versions up to server 2k3 (i havnt tried to compile using this one instead of an old one but it should make no problems)[/list:u]
the NMAKE tool[/list:u]
and a replacement for the lib.exe (described below)[/list:u]
ok, lets begin with the installation of the above, the order shouldnt matter:
vc tooklit:
this should be pretty easy: install it first
then you need to set your environment variables (im sorry but i cant describe this one here because im using a foreign version of windows ;-) to contain the bin directory in the %path% variable, the include directory in %include% and the lib directiry in %lib% (you may need to create some of these variables)
platform sdk:
this should be the same as above :-)
nmake:
just extract them by executing the downloaded exe and put the extracted files to some folder included in your %path% variable (like the platform sdk\bin directory)
lib.exe:
there are 2 ways to solve the missing lib.exe problem:
1. create a text file in a %path% directory and rename it to "lib.bat", then put the following text into it
@echo off
SET LIB_ARGUMENTS=/LIB
:LIB_ARG_LOOP
IF $%1$ == $$ GOTO LIB_RUN
SET LIB_ARGUMENTS=%LIB_ARGUMENTS% %1
SHIFT
GOTO LIB_ARG_LOOP
:LIB_RUN
link %LIB_ARGUMENTS%
the downside of this method is that some librarys (not wxwidgets) wont compile with this, because they're searching for an lib.
EXE.
but theres another solution o this problem: make your own lib.exe ;-)
create a new simple c++ project, paste the following code and compile
/*
* lib.c
*
* simulate missing lib.exe by calling link.exe /lib
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
static int
findInPath (
char * fullpath,
const char * executable)
{
const char * pathvar = getenv ("PATH");
const char * dirstart = pathvar;
const char * dirend;
int dirlen;
FILE * dummy;
if (pathvar == NULL) {
return 0;
}
while (dirstart [0] != '\0') {
dirend = strchr (dirstart, ';');
if (dirend == NULL) {
dirlen = strlen (dirstart);
}
else {
dirlen = dirend - dirstart;
}
sprintf (fullpath, "%.*s\\%s", dirlen, dirstart, executable);
dummy = fopen (fullpath, "rb");
if (dummy != NULL) {
fclose (dummy);
return 1;
}
if (dirend == NULL) {
return 0;
}
dirstart = dirend + 1;
}
return 0;
}
int main (
int argc,
const char ** argv)
{
char fullpath [255];
char ** newargs;
if (!findInPath (fullpath, "link.exe")) {
fprintf (stderr, "lib.exe: link.exe not found in %PATH%\n");
exit (2);
}
newargs = calloc (argc + 2, sizeof (char*));
if (newargs == NULL) {
fprintf (stderr, "lib.exe: allocation of arguments failed\n");
exit (2);
}
memcpy (newargs + 2, argv + 1, (argc - 1) * sizeof (char *));
newargs [0] = "link.exe";
newargs [1] = "/lib";
execv (fullpath, newargs);
}
note: this and the lib.bat are NOT my creations, i pulled them from another side but cant remember the url :-/
this should be everything thats needed to build wxWidgets.
now edit yout setup.h (located in %WXWIN%\include\wx\msw, and dont forget to copy it to %WXWIN%\include\wx) and your config.vc (located in %WXWIN%\build\msw) to suit your needs ande compile by typing "nmake -f makefile.vc" on the console in the %WXWIN%\build\msw directory.
now lean back and watch your wx libs to compile :-)