This tutorial might be obsolete. The SVN version of the OP2SDK supports VC 2008 thanks to Hooman. Download the updated SDK from there.As some of you might know, it is impossible so use the SDK to create maps in
Visual C++ 2008 (Express Edition). (Hereafter called VC 2008 Express)
VC 2008 Express is basically the free version of VC 2008.
After a lot of tinkering, I got it to work!
Note: I only tested this on my sytem: VC 2008 Express, on Vista Home Premium SP1. I can not guarantee that this edit will work on other setups.
Okay, so, first up: Download and install VC 2008 Express
(download here).
It doesn't really matter where you place this.
This should all go smoothely.
If you haven't already, download
OP2, and save that somewhere you will keep it. (I have this in D:\Program Files\OP2\Game\).
Next, download the
OP2 SDK.
Edit: You can also try the direct file
here.
Then, create a folder somewhere on your drive, to place all your coding-files (I have it in D:\Program Files\OP2\SDK\).
Then, copy the downloaded SDK there.
That folder should now contain these sub-folders:
- Lib
- Outpost2DLL
- OP2Helper
- Multiplayer
- Multiplayer Hooville
Next, copy either /Multiplayer/ or /Multiplayer Hooville/ in that same directory, and rename it to your new dll's name (this name is just for clarity).
Next, go in that directory and open OP2Script.dsp. That should launch VC, and ask you if you want to convert your project. Click 'yes'.
This is where the fun begins.
You'd expect after all this, you would be able to compile.
Try it (F7). It will then ask you to save the .sln. Just click 'save', as it should automatically get the correct name and folder.
BAM! Error: " cannot open file 'LIBC.lib' ".
This is because VC 2008 doesn't support this old file anymore
To fix this, go to the top menu of VC, and click 'Project > OP2Script Properties' (or hit ALT+F7).
Then, open up 'Configuration Properties > Linker > Input' inside the tree-menu on the left.
Select the text next to 'Aditional Dependencies', and delete "..\lib\libctiny.lib", so that only "..\lib\op2.lib" remains.
Then, select the text next to 'Ignore Specific Librarys', and delete "libcmt.lib" (it should be blank now).
Press 'ok', and hit F7 again.
Tadaa! Build succeeded.
You can now start coding away!
One more thing though: It might be smart to keep a copy of this new project, so you don't have to go into the settings again. (I simply called it template).
So from then on, you can just copy that folder, instead of doing all of the points above.
The finished dll will be called 'OP2Script.dll', and will be placed in /ReleaseMinSize/ .
To really see if your build was successfull, go to one of the first lines of main.cpp (around line 25), and change the DeskBlock's MultiLastOneStanding into Tutorial.
Recompile, rename to t15 (tutorial 15 [change number if needed]), and look it up in OP2.
WOW, long post.. :heh: