I suggest that these instructions for compiling under Windows be added to the Core docs area. This was taken from the thread at the following link: viewtopic.php?f=20&t=3414
This is for Visual C++ 2008 Express. You need the installation and probably a Windows SDK. I am working under Windows XP SP3. If you have a full edition of Visual Studio 2008 this is also fine, but its not free. MSVC 2008 Express is free.
Use SVN to fetch the latest core revision (318, while I write this).
Open a CMD-Window with the entry 'Visual Studio 2008 Command Prompt", which you will find under the program start menu, it should be under Microsoft Visual Studio 2008..../Tools. This is important, since you want the environment from VC 2008!
Go to the folder .../polserver/trunk/lib/STLPort5, where you installed the sources.
Now look into this folder, you should find a file configure.bat.
Use and type in the command shell:
configure msvc9 --extra-cxxflag "/D_WIN32_WINNT=0x0501"
The option --extra-cxxflag is optional, it tells, that your lowest Operating System is Win2000/XP.
If you are curious, type configure --help before that.
If this step succeeds it says 'go to build/lib....'. Do it, and type
nmake clean install
This runs for 2 minutes, then you have the STLPort library (you need the static lib).
Close the command window.
Turley added that the whole step 1 can be replaced with the calling of one of the batchfiles:
msvc9 is for vs2008 and msvc10 for vs2010
Start up MSVC 2008, go to
Open pol-2008.sln as solution with MSVC 2008. Do NOT open any other of the files, or VC will spam you with conversions and fill your folder with stuff.
You should see a project folder with several projects.
Step 3: (Only for MSVC 2008 Express)
You can skip this step, if you have a full version of MSVC 2008 instead of the Express edition, which is free.
Now you have to change at least these files, or the build will fail:
All you need to do is replace exactly one line
in each of these files. The reason is, that MSVC 2008 Express comes without the MFC library, which you do not need anyway. So you do not have the file afxres.h. Replace one line in every of the 3 files with these 3 lines
#define IDC_STATIC (-1)
I.e. you comment the include of afxres.h and replace it with the next two lines. Ignore the other text in these files, even if there are other strings named afxres. (This fix can be googled on the Internet, using the search string Visual Studio Express afxres.h or similar).
If you have a full edition of Visual Studio the previous step is not needed.
Now in MSVC 2008 make sure you select 'Release' instead of 'Debug'. Debug is default so you have to change it. You want to build a Win32 Release.
Next right click on the project map an build it. It should build all, including the tools (ecompile, uoconvert, etc). There will be several warnings, but no errors.
Step 5: (optional)
There is a folder
which can be used to build a distribution, but this step is not necessary. You can collect the items yourself. If you want to use it, look at the file makefile.vc. You have to change it, if you do not have Winzip. Its rather simple. To build the distro right click on the entry 'dist' in your project map view and build it.
Or you collect the files yourself: There are 'Release folders in all the folders for the several parts, the pol core can be found under
and so on.
Do not forget to collect the *.em files, and the core-changes.txt from the folder
Thats all. I have scripts ready for 0.98.2, and they run unchanged under the newest core rev 318. If you want to try it, do not forget to use the new ecompile to compile all your scripts and use the new uoconvert to remake your realms.
Then pol should start normally and be usable.
With my first compile experiment (after much cursing and fiddling around, I was unsure with pol-xxxx.sln to use) I had a core crash after start, (assertion with a script) but using an older ecompile (from POL 0.99 lates official beta) fixed it. I then refetched the rev 318, and did a clean compile of both the STLPort5 and POL, and the crash was never seen again.
I am sure that several steps are not optimal - maybe somebody can comment? But it works for me...