Difference between revisions of "HowTo:VCPP Compiling"

From VsWiki
Jump to: navigation, search
(Added some links (mostly to the DXSDK))
(Added vega-vc8 references Compiling under Visual C++)
Line 11: Line 11:
 
When using another module (e.g. <code>vegastrike</code>, <code>vssetup</code>), they should be placed in the directory above <code>vega-proj</code> in the directory tree.
 
When using another module (e.g. <code>vegastrike</code>, <code>vssetup</code>), they should be placed in the directory above <code>vega-proj</code> in the directory tree.
  
For example, when you want to checkout Vegastrike, you may make a <code>Vegastrike</code> directory and from there, checkout <code>vega-proj</code> (or <code>vega-vc7</code> for "dot-NET" or Express users), <code>vegastrike</code>, <code>data</code> and then <code>vssetup</code> ALL from this directory.
+
For example, when you want to checkout Vegastrike, you may make a <code>Vegastrike</code> directory and from there, checkout <code>vega-proj</code> (or <code>vega-vc7</code> for "dot-NET" or <code>vega-vc8</code> for Express users), <code>vegastrike</code>, <code>data</code> and then <code>vssetup</code> ALL from this directory.
  
 
* <code>vegastrike/</code> - base directory.
 
* <code>vegastrike/</code> - base directory.
Line 17: Line 17:
 
* <code>vegastrike/vega-proj/</code> - The project files. (VISUAL C++ 6.x)
 
* <code>vegastrike/vega-proj/</code> - The project files. (VISUAL C++ 6.x)
 
* <code>vegastrike/vega-vc7/</code> - The project files. (VISUAL C++ 7.x)
 
* <code>vegastrike/vega-vc7/</code> - The project files. (VISUAL C++ 7.x)
 +
* <code>vegastrike/vega-vc8/</code> - The project files. (VISUAL C++ 8.0)
 
* <code>vegastrike/vssetup/</code> - the vssetup module directory.
 
* <code>vegastrike/vssetup/</code> - the vssetup module directory.
 
* <code>vegastrike/texturizer/</code> - If you want to compile the texturizer.
 
* <code>vegastrike/texturizer/</code> - If you want to compile the texturizer.

Revision as of 15:11, 27 March 2006

arrow_left.png Checkout CVS arrow_up.png HowTos Cygwin Compiling arrow_right.png

Compiling under Visual C++

First, check out the CVS modules.

When using another module (e.g. vegastrike, vssetup), they should be placed in the directory above vega-proj in the directory tree.

For example, when you want to checkout Vegastrike, you may make a Vegastrike directory and from there, checkout vega-proj (or vega-vc7 for "dot-NET" or vega-vc8 for Express users), vegastrike, data and then vssetup ALL from this directory.

  • vegastrike/ - base directory.
  • vegastrike/vegastrike/ - The stuff from the vegastrike module (the actual code)
  • vegastrike/vega-proj/ - The project files. (VISUAL C++ 6.x)
  • vegastrike/vega-vc7/ - The project files. (VISUAL C++ 7.x)
  • vegastrike/vega-vc8/ - The project files. (VISUAL C++ 8.0)
  • vegastrike/vssetup/ - the vssetup module directory.
  • vegastrike/texturizer/ - If you want to compile the texturizer.
  • vegastrike/data4.x - The newer version of data. Does not need -kb Binaries will be compiled into the bin directory, so it should be here in the tree if you do not want to edit project settings.

module data (the old data module) is the one exception to this rule. Can be put anywhere on your hard drive. DATA (NOT data4.x, only data) MUST BE CHECKED OUT WITH THE -kb PARAMETER (=BINARY MODE) The data module is for really old data only (up to version 3.9).

Here is a list of every project included for CVS compilation:

  • AsterGet (AsterGen.exe) - Not used
  • mission (Mission Launcher.exe) - Not used
  • savegame (Launcher.exe) - Not required but still used for selecting missions
  • texturizer (Texturizer.exe) - Not used
    • REQUIRES texturizer module
  • TriSort (TriSort.exe) - Not used?
  • vsacctserver (accountserver.exe) - Soon to be functional in Windows
  • vegastrike (Vegastrike.exe) - used - VegaStrike binary
  • vsserver (vegaserver.exe) - Soon to be functional in Windows
  • vssetup (Setup.exe) - used
    • REQUIRES vssetup module

Visual C++ 6.0 (deprecated)

As of the end of December, 2005, VegaStrike has dropped compatibility for VC 6 because of the new OGRE rendering engine.

Until mid-January, VC 6 users may still be able to get it to compile under the Debug Boost 129/Release Boost 129 project settings (Do not use the standard Debug and Release).

This is not to say that it won't completely work... if you have a lot of experience in C++, you may be able to kludge OGRE to get it to compile and maybe run.

VC 6 users can grab a free copy of VC 8 (Visual Studio 2005 Express) off the Microsoft site, and follow the directions below to compile.

Visual C++ 8.0 (2005 Express)

Warning: VC8 requires a big download off Microsoft's site.

Until November 6, 2006, Microsoft seems to be offering a non-expiring version of VC8. After November 2006 we will find another way to compile Vegastrike on Windows.

This will work on Windows 2000 or XP (Not sure about 98,95...).

  1. You have two download choices:
  2. Install the Windows Platform SDK (Instructions - FULL ISO version(395MB)).
  3. Install the DirectX SDK (337MB) - As of now, it is required for OpenAL, but not all of it.
  4. Disable Intellisense: Microsoft provides no GUI for this, but it is recommended unless you want to eat up twice the RAM and wait 10-20 seconds between saving each file.
    • Browse to your VC8 install.
    • Go to the VC/vcpackages folders and rename the "feacp" DLL file to anything else like "feacp_backup.dll". This should not break anything... it will only disable IntelliSense.
  5. Checkout the Vegastrike project as described earlier.
  6. Open the "vega-vc7" project using the IDE, and go through the process of importing (Warning: The import will break backward compatibility, so if you plan on using the project in VC7 or 2003 TK, then make a copy for vc8 and import there.)
  7. Remove the odbc.lib:
    • In the Project options page, go to each project, select under configurations "All" where it says Debug or Release, and in the "Linker" panel, remove the odbc or odbc32.lib files. These will cause linker errors, and VC8 adds them for some unknown reason.
  8. The compilation should go for the most part smoothly. If you encounter any problems, please tell us in the forum or specifically on this thread.

Visual Studio 7.x

Compiling from the command line with Visual Studio

Here is a batch file that could be used to checkout everything and then compile all projects (copy and paste in makeall.bat), if you were going somewhere for a few hours and wanted to get a working project when you got back:

@echo off
mkdir vegastrike
cd vegastrike
echo ***** Type in {ENTER} for password when asked *****
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co vega-vc7
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co vegastrike
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co vssetup
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co texturizer
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co data4.x
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike logout
cd vega-vc7
echo Building project...
"C:\VC7\Common7\IDE\devenv.exe" vegastrike.sln /BUILD Debug
cd ..
cd ..

NOTE: You must replace the "C:\vc7" with the directory where you installed visual c++ 7 and replace the "Debug" on the same line with "Release" if you want a release build.

Compiling with the Visual Studio GUI

(This is written with Visual C++ .NET Standard in mind)

Once you have checked out the vegastrike and vega-vc7 modules from CVS, use Visual Studio to open vegastrike.sln, found in the vega-vc7 directory. When compiling for release, select "Release Boost 131" from the drop-down menu on the toolbar. Right-click on the "vegastrike" project in the "solution explorer" sidebar, and then select "Build".

Visual C++ Toolkit 2003

This is a free download from Microsoft, and is the same compiler and linker as Visual Studio 2003.

Note, you must have Windows XP or 2000 in order to install the toolkit. (formerly said only Windows XP, but this is not true according to their download page)

Downloads


Configuring Code::Blocks

  • Run CodeBlocks. The first time you install it, you will be listed with a set of compilers. Select Microsoft Visual C++ Toolkit, and click Set As Default.
  • For configuration you have to include the location of the Windows Platform SDK. Go to Settings -> Compiler in the menu. Click the Directories tab. Add the directory "C:\Program Files\Microsoft SDK\bin" to the Resource Compiler tab.

Compiling with Code::Blocks and Visual C++ Toolkit

Once you have checked out the vegastrike and vega-vc7 modules from CVS, import the vegastrike.sln file, found in the vega-vc7 directory into Code::Blocks using Project->Import->MS Visual Studio Solution in the menu.

Note (CVS version as of 14 Nov 2005

Using the most recent CVS versions (and 2003/Runtime versions from Microsoft) I had to remove /W from the build options Project Build Options > Compiler Options > Other Options

See Also


arrow_left.png Checkout CVS arrow_up.png HowTos Cygwin Compiling arrow_right.png