Jump to content

Compiling SDK Express: Difference between revisions

From Kingpin Wiki
Created page with "<h3>Introduction</h3> <p>Since most people have not <a href="https://en.wikipedia.org/wiki/Microsoft_Visual_Studio" target="_blank">Microsoft Developer Studio</a> becouse it's quite expensive, lucky <a href="https://en.wikipedia.org/wiki/Microsoft" target="_blank">Microsoft</a> brought a freeware version off it called <a href="https://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express" target="_blank">Microsoft Visual Studio Express. </a></p> <p>It has not got a <a hr..."
 
No edit summary
Line 1: Line 1:
<h3>Introduction</h3>
<h3>Introduction</h3>
<p>Since most people have not <a href="https://en.wikipedia.org/wiki/Microsoft_Visual_Studio" target="_blank">Microsoft Developer Studio</a> becouse it's quite expensive, lucky <a href="https://en.wikipedia.org/wiki/Microsoft" target="_blank">Microsoft</a> brought a freeware version off it called <a href="https://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express" target="_blank">Microsoft Visual Studio Express. </a></p>
<p>Since most people have not [https://en.wikipedia.org/wiki/Microsoft_Visual_Studio Microsoft Developer Studio] becouse it's quite expensive, lucky [https://en.wikipedia.org/wiki/Microsoft Microsoft] created a freeware version off it called [https://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express Microsoft Visual Studio Express.]</p>
<p>It has not got a <a href="https://en.wikipedia.org/wiki/Resource_%28Windows%29" target="_blank" title="Resource (Windows)">resource</a> editor, but it's good enough to compile the Kingpin SDK.</p>
<p>It has not got a [https://en.wikipedia.org/wiki/Resource_%28Windows%29 resource] editor, but it's good enough to compile the Kingpin SDK.</p>
<p>These tutorials should work for the following versions:</p>
<p>These tutorials should work for the following versions:</p>
<ul>
<ul>
<li><a href="http://go.microsoft.com/fwlink/?linkid=57034">Visual C++ 2005 Express Edition</a> - 462 MB</li>
<li>[http://go.microsoft.com/fwlink/?linkid=57034 Visual C++ 2005 Express Edition]- 462 MB</li>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=104679">Visual Studio Express 2008</a> -&nbsp;748 MB</li>
<li>[https://go.microsoft.com/fwlink/?LinkId=104679 Visual Studio Express 2008] - 748 MB</li>
<li><a href="https://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso">Visual Studio Express 2008 SP1</a> -&nbsp;748 MB</li>
<li>[https://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso Visual Studio Express 2008 SP1] - 748 MB</li>
<li><!--<a href="https://go.microsoft.com/?linkid=9709969">--> <a href="https://drive.google.com/file/d/1TcBAcT_OFYnjIzxhtkpL41nxIGWfOCX-/view" target="_blank"> Visual Studio Express 2010</a> - 693 MB</li>
<li>[https://drive.google.com/file/d/1TcBAcT_OFYnjIzxhtkpL41nxIGWfOCX-/view Visual Studio Express 2010] - 693 MB</li>
<li><a href="http://download.microsoft.com/download/1/F/5/1F519CC5-0B90-4EA3-8159-33BFB97EF4D9/VS2012_WDX_ENU.iso" target="_blank">Visual Studio Express 2012</a> - 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>
</ul>
<p>The following should work but have not really tested them, or maybe need some small adjustments:</p>
<p>The following should work but have not really tested them, or maybe need some small adjustments:</p>
<ul>
<ul>
<li><a href="https://go.microsoft.com/fwlink/?LinkId=519391" target="_blank">Visual Studio Express 2013</a> - 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><a href="http://download.microsoft.com/download/0/B/C/0BC321A4-013F-479C-84E6-4A2F90B11269/vs2015.com_enu.iso" target="_blank">Visual Studio Express 2015</a> - 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&nbsp;<a href="https://en.wikipedia.org/wiki/Microsoft_Visual_Studio" target="_blank">Microsoft Developer Studio</a> 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 style="height: 2px; border-width: 0; background-color: #e7c258;" />
<h3>&nbsp;</h3>
<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 30: Line 29:
<li>Now you got options to select, choose from Application type; DLL and from Additional options;&nbsp; Empty project and click on Finish.</li>
<li>Now you got options to select, choose from Application type; DLL and from Additional options;&nbsp; Empty project and click on Finish.</li>
</ol>
</ol>
<h3>&nbsp;</h3>
<h3>Adding Files to the New Project</h3>
<h3>Adding Files to the New Project</h3>
<p>Now that we have our project and workspace, we need to add id's&nbsp;<a href="https://www.kingpin.info/download/index.php?dir=kingpin/server/official/sdk/&amp;file=kpsdk.zip">Kingpin SDK source</a> files to the project.</p>
<p>Now that we have our project and workspace, we need to add id's [https://www.kingpin.info/download/index.php?dir=kingpin/server/official/sdk/&amp;file=kpsdk.zip Kingpin SDK source] files to the project.</p>
<ol>
<ol>
<li>Create a new folder in your project directory called "Source"</li>
<li>Create a new folder in your project directory called "Source"</li>
<li>Copy the&nbsp;<a href="https://www.kingpin.info/download/index.php?dir=kingpin/server/official/sdk/&amp;file=kpsdk.zip">Kingpin source</a> files to this directory</li>
<li>Copy the [https://www.kingpin.info/download/index.php?dir=kingpin/server/official/sdk/&amp;file=kpsdk.zip Kingpin source] files to this directory</li>
<li>Under the menu Project-&gt;Add Exiting Item..</li>
<li>Under the menu Project-&gt;Add Exiting Item..</li>
<li>Change to the source directory you just created</li>
<li>Change to the source directory you just created</li>
Line 41: Line 39:
<li>Select all of the files that appear in the window and click OK</li>
<li>Select all of the files that appear in the window and click OK</li>
</ol><hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
</ol><hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
<h3>&nbsp;</h3>
<h3>Fixing the Compiler</h3>
<h3>Fixing the Compiler</h3>
<p>There still some things missing from the compiler the Kingpin SDK. Kingpin needs NavLib.lib otherwise it won't compile.</p>
<p>There still some things missing from the compiler the Kingpin SDK. Kingpin needs NavLib.lib otherwise it won't compile.</p>
Line 53: Line 50:
<li>and click OK</li>
<li>and click OK</li>
</ol>
</ol>
<h4>To fix the error:</h4>
<h4>To fix the errors</h4>
<p>For <a href="http://go.microsoft.com/fwlink/?linkid=57034">Visual C++ 2005 Express Edition</a>:<br /><strong>To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.</strong></p>
<p>For Visual C++ 2005 Express Edition:<br /><strong>To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.</strong></p>
<ol>
<ol>
<li>menu Project-&gt;projectname Properties or ALT+F7</li>
<li>menu Project-&gt;projectname Properties or ALT+F7</li>
Line 61: Line 58:
<li>and click OK</li>
<li>and click OK</li>
</ol>
</ol>
<p>For <a href="https://go.microsoft.com/fwlink/?LinkId=104679">Visual Studio Express 2008</a>, <a href="https://go.microsoft.com/?linkid=9709969">Visual Studio Express 2010</a> and <a href="https://www.microsoft.com/en-us/download/details.aspx?id=34673" target="_blank">Visual Studio Express 2012</a>:<br /><strong>To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.</strong></p>
<p>For Visual Studio Express 2008, Visual Studio Express 2010 and Visual Studio Express 2012:<br /><strong>To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.</strong></p>
<ol>
<ol>
<li>menu Project-&gt;projectname Properties or ALT+F7</li>
<li>menu Project-&gt;projectname Properties or ALT+F7</li>
Line 69: Line 66:
</ol>
</ol>
<p>That should remove most warning, for the stricmp error they always should be Q_stricmp.</p>
<p>That should remove most warning, for the stricmp error they always should be Q_stricmp.</p>
<p>For <a href="https://www.microsoft.com/en-us/download/details.aspx?id=34673" target="_blank">Visual Studio Express 2012</a>:<br /><strong>To disable; error LNK2026: module unsafe for SAFESEH image.</strong></p>
<p>For Visual Studio Express 2012:<br /><strong>To disable; error LNK2026: module unsafe for SAFESEH image.</strong></p>
<ol>
<ol>
<li>menu Project-&gt;Properties or ALT+F7</li>
<li>menu Project-&gt;Properties or ALT+F7</li>
Line 76: Line 73:
<li>and click OK</li>
<li>and click OK</li>
</ol><hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
</ol><hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
<h3>&nbsp;</h3>
<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 (<a href="https://go.microsoft.com/fwlink/?LinkId=104679">Visual Studio Express 2008</a>)</strong>:</p>
<ol>
<ol>
<li>menu Project-&gt;projectname Properties or ALT+F7</li>
<li>menu Project-&gt;projectname Properties or ALT+F7</li>
Line 84: Line 80:
<li>and click OK</li>
<li>and click OK</li>
</ol>
</ol>
<p><strong>To compile the DLL with the correct name&nbsp; (<a href="https://go.microsoft.com/?linkid=9709969">Visual Studio Express 2010</a> and <a href="https://www.microsoft.com/en-us/download/details.aspx?id=34673" target="_blank">Visual Studio Express 2012</a>)</strong>:</p>
<p><strong>To compile the DLL with the correct name&nbsp; (Visual Studio Express 2010 and Visual Studio Express 2012)</strong>:</p>
<ol>
<ol>
<li>menu Project-&gt;Properties or ALT+F7</li>
<li>menu Project-&gt;Properties or ALT+F7</li>
Line 91: Line 87:
<li>and click OK</li>
<li>and click OK</li>
</ol><hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
</ol><hr style="height: 2px; border-width: 0; background-color: #e7c258;" />
<h3>&nbsp;</h3>
<h3>Download project files</h3>
<h3>Download project files</h3>
<table style="width: 300px; border-collapse: collapse;" border="0">
<table style="width: 300px; border-collapse: collapse;" border="0">
<tbody>
<tr>
<tr>
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;"><a href="https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc6.zip">Microsoft Visual 6.0</a></td>
<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>
</tr>
</tr>
<tr>
<tr>
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;"><a href="https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc2005.zip">Visual Express 2005</a></td>
<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>
</tr>
<tr>
<tr>
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;"><a href="https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc2008.zip">Visual Express 2008</a></td>
<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>
</tr>
</tr>
<tr>
<tr>
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;"><a href="https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc2010.zip">Visual Express 2010</a></td>
<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>
</tr>
<tr>
<tr>
<td style="border-color: #e7c258; border-style: solid; border-width: 2px; text-align: center;"><a href="https://www.kingpin.info/download/index.php?dir=kingpin/server/unofficial/sdk/&amp;file=vc2012.zip">Visual Express 2012</a></td>
<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>
</tr>
</tbody>
</table>
</table>

Revision as of 22:34, 19 February 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:

The following should work but have not really tested them, or maybe need some small adjustments:

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