Compiling under VS2010

From Valve Developer Community
Revision as of 05:02, 23 July 2010 by TomEdwards (talk | contribs) (style)
Jump to navigation Jump to search
Visual studio logo.png

Visual Studio 2010 is the best choice for Source. You can use the free C++ Express edition.

Alien Swarm conversion

Converting the Alien Swarm server project to VS2010 will lead to an "invalid characters in path" error. To fix it, open game\server\swarm_sdk_server.vcproj with a text editor and delete "' $File" from line 2232.

Debugging

  1. Follow the instructions for fixing debug compiles in VS2008, which apply here as well.
  2. Right click on the client and server projects in VS and go to Properties > Configuration > General. Change Target Name to client and server respectively.

Fixing Warnings

If you want to remove the "precompiled header" warnings seen during a full compile, open these files in your client project and move #include "cbase.h" up to the first line:

  1. hud_locator.cpp
  2. hud_credits.cpp
  3. hud_flashlight.cpp

Compiling Under Linux

VS 2010 introduces a new project file format (.vcxproj) which is not compatible with the SDK's VprojToMake tool. A third-party update adding support is available.

See also