No announcement yet.

Compiling the SDK

This is a sticky topic.
  • Filter
  • Time
  • Show
Clear All
new posts

  • MMC
    The SDK converts to Visual C++ 2005 (8.0) as long as you remember the ensure that no files are read-only. I haven't tried compiling it yet, so I can't say about possible stability issues, but I don't think there should be many (VC++ 2003 -> 2005 shouldn't have anywhere near as many problems as VC++ 6 -> 2003 is famous for).

    Also Visual Studio 2005 Express Edition is fully capable of handling the SDK. Plus it's free, which is rare for Microsoft.

    Leave a comment:

  • Locutus
    started a topic Compiling the SDK

    Compiling the SDK

    Edit: I merged this thread with smacfan's, since they cover the same topic.

    I suspect there will be some issues with this, so might as well create a thread about it.

    If you have Visual Studio 2003 (Visual C++ 7) you should be able to load the SDK up directly. If not, you can use the following process to get codeblocks to allow you to modify and compile the SDK. All the software you need for this is freeware. DaveMcW pioneered this:

    Here is a free method of building the DLL. (Thanks to Ogre Wiki 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 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 (found in the .NET runtime)
    msvcprt.lib (Read Ogre Wiki to see where this comes from)

    3: Download the Platform SDK. You can also use internet explorer to install it automatically (recommended).

    4: Download the latest CodeBlocks "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 !
    Last edited by Locutus; April 15, 2006, 08:53.