DaveMcW
Apr 13, 2006, 02:13 PM
Edit: Oops, Kael already posted this at http://forums.civfanatics.com/showthread.php?t=166933. Mods, feel free to delete this thread.
Here is a free method of building the SDK. (Thanks to Ogre Wiki (http://www.ogre3d.org/wiki/index.php/Codeblocks) for many of the details.)
I had trouble getting some of the debug options to compile, so I turned them off.
1: Download the VC++ Toolkit 2003 (http://msdn.microsoft.com/visualc/vctoolkit2003/) and install it.
2: Grab the 3 multithreaded library files and put them in C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib.
msvcrt.lib and msvcrtd.lib (http://rapidshare.de/files/10364051/Desktop.rar.html) (found in the .NET runtime (http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe))
msvcprt.lib (http://root.cern.ch/root/Procedure/msvcprt.lib) (Read Ogre Wiki (http://www.ogre3d.org/wiki/index.php/Codeblocks) to see where this comes from)
3: Download the Platform SDK (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm). You can also use internet explorer to install it automatically (http://www.microsoft.com/msdownload/platformsdk/sdkupdate) (recommended).
4: Download the latest CodeBlocks (http://www.codeblocks.org/) "without compiler" and install it.
5: The first time you install CodeBlocks, you will be shown a list of compilers. Select Microsoft Visual C++ Toolkit, and click Set As Default. Press OK.
6: Go to Settings->Compiler in the CodeBlocks menu. Click the "Directories" tab and add the the following directories to the compiler tab (changing to account for where you installed the packages):
C:\Program Files\Microsoft Visual C++ Toolkit 2003\Include
C:\Program Files\Microsoft Platform SDK\Include
In the Directories/Linker tab add the following directories:
C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib
C:\Program Files\Microsoft Platform SDK\Lib
7: Open \CvGameCoreDLL\CvGameCoreDLL.vcproj in CodeBlocks.
8: Go to Project->Build options->Final Release.
On the "Compiler Flags" tab, uncheck "Produce debugging symbols [/Zi]".
On the "Other options" tab, change EHsc to /EHsc
On the "Linker" tab, add a new link library called user32
Also on the Linker tab, delete the linker option "/pdb:Final Release\CvGameCoreDLL.pdb" and press OK.
9: Change the "Build target" drop-down to Final Release.
10: File->Save project. This creates a CodeBlocks project (.cbp) that you can open in the future.
11: Build->Build. When the compiler finishes, you will have \..\Assets\CvGameCoreDLL.dll !
Here is a free method of building the SDK. (Thanks to Ogre Wiki (http://www.ogre3d.org/wiki/index.php/Codeblocks) for many of the details.)
I had trouble getting some of the debug options to compile, so I turned them off.
1: Download the VC++ Toolkit 2003 (http://msdn.microsoft.com/visualc/vctoolkit2003/) and install it.
2: Grab the 3 multithreaded library files and put them in C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib.
msvcrt.lib and msvcrtd.lib (http://rapidshare.de/files/10364051/Desktop.rar.html) (found in the .NET runtime (http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe))
msvcprt.lib (http://root.cern.ch/root/Procedure/msvcprt.lib) (Read Ogre Wiki (http://www.ogre3d.org/wiki/index.php/Codeblocks) to see where this comes from)
3: Download the Platform SDK (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm). You can also use internet explorer to install it automatically (http://www.microsoft.com/msdownload/platformsdk/sdkupdate) (recommended).
4: Download the latest CodeBlocks (http://www.codeblocks.org/) "without compiler" and install it.
5: The first time you install CodeBlocks, you will be shown a list of compilers. Select Microsoft Visual C++ Toolkit, and click Set As Default. Press OK.
6: Go to Settings->Compiler in the CodeBlocks menu. Click the "Directories" tab and add the the following directories to the compiler tab (changing to account for where you installed the packages):
C:\Program Files\Microsoft Visual C++ Toolkit 2003\Include
C:\Program Files\Microsoft Platform SDK\Include
In the Directories/Linker tab add the following directories:
C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib
C:\Program Files\Microsoft Platform SDK\Lib
7: Open \CvGameCoreDLL\CvGameCoreDLL.vcproj in CodeBlocks.
8: Go to Project->Build options->Final Release.
On the "Compiler Flags" tab, uncheck "Produce debugging symbols [/Zi]".
On the "Other options" tab, change EHsc to /EHsc
On the "Linker" tab, add a new link library called user32
Also on the Linker tab, delete the linker option "/pdb:Final Release\CvGameCoreDLL.pdb" and press OK.
9: Change the "Build target" drop-down to Final Release.
10: File->Save project. This creates a CodeBlocks project (.cbp) that you can open in the future.
11: Build->Build. When the compiler finishes, you will have \..\Assets\CvGameCoreDLL.dll !