Jump to content

Compiling SDK Express: Difference between revisions

From Kingpin Wiki
No edit summary
No edit summary
Line 9: Line 9:
<li>[https://drive.google.com/file/d/1TcBAcT_OFYnjIzxhtkpL41nxIGWfOCX-/view Visual Studio Express 2010] - 693 MB</li>
<li>[https://drive.google.com/file/d/1TcBAcT_OFYnjIzxhtkpL41nxIGWfOCX-/view Visual Studio Express 2010] - 693 MB</li>
<li>[http://download.microsoft.com/download/1/F/5/1F519CC5-0B90-4EA3-8159-33BFB97EF4D9/VS2012_WDX_ENU.iso Visual Studio Express 2012] - 607 MB</li>
<li>[http://download.microsoft.com/download/1/F/5/1F519CC5-0B90-4EA3-8159-33BFB97EF4D9/VS2012_WDX_ENU.iso Visual Studio Express 2012] - 607 MB</li>
</ul>
<p>The following should work but have not really tested them, or maybe need some small adjustments:</p>
<ul>
<li>[http://download.microsoft.com/download/7/2/E/72E0F986-D247-4289-B9DC-C4FB07374894/VS2013_RTM_DskExp_ENU.iso Visual Studio Express 2013] - 3.3 GB</li>
<li>[http://download.microsoft.com/download/7/2/E/72E0F986-D247-4289-B9DC-C4FB07374894/VS2013_RTM_DskExp_ENU.iso Visual Studio Express 2013] - 3.3 GB</li>
<li>[http://download.microsoft.com/download/0/B/C/0BC321A4-013F-479C-84E6-4A2F90B11269/vs2015.com_enu.iso Visual Studio Express 2015] - 3.7 GB</li>
<li>[http://download.microsoft.com/download/0/B/C/0BC321A4-013F-479C-84E6-4A2F90B11269/vs2015.com_enu.iso Visual Studio Express 2015] - 3.7 GB</li>
</ul>
</ul>
<p>It also should work with the [https://en.wikipedia.org/wiki/Microsoft_Visual_Studio Microsoft Developer Studio] versions.</p>
<p>It also should work with the [https://en.wikipedia.org/wiki/Microsoft_Visual_Studio Microsoft Developer Studio] versions.</p>
<hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
<hr>
<h3>Creating a New Project</h3>
<h3>Creating a New Project</h3>
<p>First, we must create the project in which we are going to work:</p>
<p>First, we must create the project in which we are going to work:</p>
Line 72: Line 69:
<li>Change Image has Safe Exception Handlers to No (SAFESEH:NO)</li>
<li>Change Image has Safe Exception Handlers to No (SAFESEH:NO)</li>
<li>and click OK</li>
<li>and click OK</li>
</ol><hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
</ol>
<hr>
<p><strong>To compile the DLL with the correct name and the correct folder for example in game folder of Kingpin (Visual Studio Express 2008)</strong>:</p>
<p><strong>To compile the DLL with the correct name and the correct folder for example in game folder of Kingpin (Visual Studio Express 2008)</strong>:</p>
<ol>
<ol>
Line 86: Line 84:
<li>Target Name: gamex86</li>
<li>Target Name: gamex86</li>
<li>and click OK</li>
<li>and click OK</li>
</ol><hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
</ol>
<hr>
<h3>Download project files</h3>
<h3>Download project files</h3>
<table style="width: 300px; border-collapse: collapse;" border="0">
{| class="wikitable"
<tr>
|-
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;">[https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc6.zip Microsoft Visual 6.0]</td>
| [https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&file=vc6.zip Microsoft Visual 6.0]
</tr>
|-
<tr>
| [https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&file=vc2005.zip Visual Express 2005]
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;">[https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc2005.zip Visual Express 2005]</td>
|-
</tr>
| [https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&file=vc2008.zip Visual Express 2008]
<tr>
|-
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;">[https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc2008.zip Visual Express 2008]</td>
| [https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&file=vc2010.zip Visual Express 2010]
</tr>
|-
<tr>
| [https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&file=vc2012.zip Visual Express 2012]
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;">[https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc2010.zip Visual Express 2010]</td>
|}
</tr>
Visual Express 2012 poject works also with Visual Express 2015 it will upgrade automaticly.
<tr>
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;">[https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc2012.zip Visual Express 2012]</td>
</tr>
</table>

Revision as of 16:12, 10 May 2025

Introduction

Since most people have not Microsoft Developer Studio becouse it's quite expensive, lucky Microsoft created a freeware version off it called Microsoft Visual Studio Express.

It has not got a resource editor, but it's good enough to compile the Kingpin SDK.

These tutorials should work for the following versions:

It also should work with the Microsoft Developer Studio versions.


Creating a New Project

First, we must create the project in which we are going to work:

  1. Start Visual C++ Express Edition
  2. Close any open Workspaces
  3. Choose from the menu File->New-Project
  4. From the New Project dialog choose Win32->Win32 Project
  5. Click in the Project name entry and type a name for your project
  6. Check the Location and make sure it's correct and press OK
  7. A Win32 Application Wizard dialog will start, click on Next.
  8. Now you got options to select, choose from Application type; DLL and from Additional options;  Empty project and click on Finish.

Adding Files to the New Project

Now that we have our project and workspace, we need to add id's Kingpin SDK source files to the project.

  1. Create a new folder in your project directory called "Source"
  2. Copy the Kingpin source files to this directory
  3. Under the menu Project->Add Exiting Item..
  4. Change to the source directory you just created
  5. Under Files of type choose All Files (*.*) make sure it's all files otherwise GAME.DEF will be missing (Without GAME.DEF it will compile and no error but the gamex86.dll won't work)
  6. Select all of the files that appear in the window and click OK

Fixing the Compiler

There still some things missing from the compiler the Kingpin SDK. Kingpin needs NavLib.lib otherwise it won't compile.

  1. menu Project->projectname Properties or ALT+F7
  2. Configuration Manager... button -> Put configuration on Release and click Close
  3. Still in Properties Pages, Configuration Properties->Linker->Input
  4. Then change the Additional Dependencies to Navlib\NavLib.lib or ..\Navlib\NavLib.lib the location where Navlib is.
  5. Add Ignore Specific Library: LIBC.lib
  6. Add Module Definition File: ../GAME.DEF or location where GAME.DEF is
  7. and click OK

To fix the errors

For Visual C++ 2005 Express Edition:
To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.

  1. menu Project->projectname Properties or ALT+F7
  2. Configuration Properties->C/C++>Prepocessor
  3. Add to Preprocessor Definitions: _CRT_SECURE_NO_DEPRECATE
  4. and click OK

For Visual Studio Express 2008, Visual Studio Express 2010 and Visual Studio Express 2012:
To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

  1. menu Project->projectname Properties or ALT+F7
  2. Configuration Properties->C/C++>Prepocessor
  3. Add to Preprocessor Definitions: _CRT_SECURE_NO_WARNINGS
  4. and click OK

That should remove most warning, for the stricmp error they always should be Q_stricmp.

For Visual Studio Express 2012:
To disable; error LNK2026: module unsafe for SAFESEH image.

  1. menu Project->Properties or ALT+F7
  2. Configuration Properties->Linker->Advanced
  3. Change Image has Safe Exception Handlers to No (SAFESEH:NO)
  4. and click OK

To compile the DLL with the correct name and the correct folder for example in game folder of Kingpin (Visual Studio Express 2008):

  1. menu Project->projectname Properties or ALT+F7
  2. Configuration Properties->Linker->General
  3. Output File: $(OutDir)\gamex86.dll
  4. and click OK

To compile the DLL with the correct name  (Visual Studio Express 2010 and Visual Studio Express 2012):

  1. menu Project->Properties or ALT+F7
  2. Configuration Properties->General
  3. Target Name: gamex86
  4. and click OK

Download project files

Microsoft Visual 6.0
Visual Express 2005
Visual Express 2008
Visual Express 2010
Visual Express 2012

Visual Express 2012 poject works also with Visual Express 2015 it will upgrade automaticly.