Logo designed by CO2 - http://www.planetquake.com/CO2
Logo designed by CO2 - http://www.planetquake.com/CO2
Logo designed by CO2 - http://www.planetquake.com/CO2
Logo designed by CO2 - http://www.planetquake.com/CO2
   
Back to HomePage

Credits

  • Puke
  • SumFuka
  • Mighty Moe

  •  

      Compiling with Microsoft Visual C++

    Introduction:

      Before we start, I'd like to say a big thank you to Ted Milker, who gathered all the information found here. He is the true author of this article:) Please mail him, or myself if you have any problems!

      This how-to will explain how to compile Quake 2's GAMEX86.DLL with Visual C++ 5.0.  Windows 95 and the Professional Edition of Visual C++ 5.0 were used in the creation of this document, but these instructions should be valid for the Learning Edition as well.  Compiling the DLL is quite simple(one key press), however, setting up the project in VC++ is a little bit more complicated(but not much).  This document can also be used as a guide to compiling with older versions, but, be aware that not all of the menus are in the same places as 5.0.

    Creating the Project:

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

        1.  Start Visual C++ 5.0
        2.  Close any open Workspaces
        3.  Choose New from the File menu
        4.  Select the Projects tab and highlight the "Win32 Dynamic-Link Library"
        5.  Click in the Project name entry and type a name for your project
        6.  Check the Location and make sure it's correct
        7.  Make sure the radio button for Create new Workspace is checked
        8.  Under Platforms, make sure Win32 is checked then click OK

    Adding Files to the Project:

      Now that we have our project and workspace, we need to add id's Quake 2 source files to the project.  I find it easiest to keep the original source in a directory off of my Quake 2 directory and copy them to my project directory using a batch file.  It should be quite easy to write this batch file, but if anyone needs help, feel free to mail me.

      1.  Create a new folder in your project directory called "Source"
      2.  Copy the Quake 2 source files to this directory
      3.  Under the menu Project->Add To Project choose Files...
      4.  Change to the source directory you just created
      5.  Under Files of type choose All Files (*.*)
      6.  Select all of the files that appear in the window and click OK

    Compiling:

      Okay, we're almost ready to compile.  Before we compile, we want to switch the project into the Release configuration, rather than the default Debug configuration.  We want to this because if we compile with the Debug configuration, it creates a DLL with a bunch of stuff(the debug information) that we don't need and it's also about 300k larger than the Release version.  I haven't tested if Quake 2 can even use a DLL with debug information compiled in.

      1.  Under the Build menu, choose "Set Active Configuration"
      2.  Double click Win32 Release or highlight it and click OK
      3.  Choose "Settings..." from the Project menu
      4.  Click the Link tab and change Output file name to "Release/gamex86.dll"
      5.  We're now ready to compile, choose Build gamex86.dll from the Build menu or press F7

    Final Comments:

      Well, that's about all there is to compiling with Visual C++ 5.0.  There is a small quirk with the above instructions, though.  I suggested creating a new directory for the source files, but, when you create new files in Developer Studio, the default location is in the root project directory.  Be sure to either change this location to your source directory or make sure your new header files reflect the fact that all the id header files are in a different directory.  This can get annoying, because you have to specify the source directory every time you create a new file.  If anyone knows how to set up the project so that it defaults to your new source directory, I'd be happy to hear about it.
                   
    
    
    
    

     

    Logo designed by CO2 - http://www.planetquake.com/CO2

    This site, and all content and graphics displayed on it,
    are ©opyrighted to the Quake DeveLS team. All rights received.
    Got a suggestion? Comment? Question? Hate mail? Send it to us!
    Oh yeah, this site is best viewed in 16 Bit or higher, with the resolution on 800*600.
    Thanks to Planet Quake for there great help and support with hosting.
    Best viewed with Netscape 4 or IE 3