Compiler choices: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(VS2010)
 
(41 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{otherlang2|ru=Compiler Choices:ru|es=Compiler Choices:es}}
{{LanguageBar}}
'''{{For|about=choosing a C++ code compiler|a list of subjects which use the word "compiler"|[[Compiler]]}}'''


[[Image:Vsexpress logo.png|right|Visual Studio Express logo]]
You have several choices for compiling unedited variants of the Source SDK depending on which version you are using.
[[Image:Gccegg-65.png|right|GCC logo]]


You have several choices for compiling the Source SDK:
= Visual Studio =
[[File:Icon-VStudio.png|150px|right|Visual Studio logo]]
[[File:Visual studio logo.png|right|thumb|Visual Studio logo used from 2010-2012.]]
{{Industry tool|{{w|Visual Studio}}}}
{{for|about=the IDE recommended for use with the Source engine's C++ code|the rich text editor commonly used with scripts|[[Visual Studio Code]]}}


#'''[http://msdn.microsoft.com/howtobuy/visualc/default.aspx Visual Studio 2005]''' / '''[http://download.microsoft.com/download/8/3/a/83aad8f9-38ba-4503-b3cd-ba28c360c27b/ENU/vcsetup.exe Visual C++ Express 2005]''' — which are the officially supported compilers.
'''Visual Studio''' is an {{w|Integrated development environment}} (IDE) developed and maintained by Microsoft. It is the default IDE recommended for use with the Source SDK on Windows. In {{src13|4}}, the default version of Visual Studio used for Source engine development is '''Visual Studio 2013''' ('''Visual Studio 2022''' for {{tf2branch|4}}). Older versions of Visual Studio are not compatible with Source 2013, and newer versions of Visual Studio will not work with Source 2013 by default.  
#'''[http://msdn.microsoft.com/vs2008/products/ Visual Studio 2008]''' / '''[http://www.microsoft.com/express/vc/ Visual C++ Express 2008]''' — which can be used [[Compiling under VS2008|after a bit of work]].
#'''[http://gcc.gnu.org/ GCC]''' — which is used to compile [[Wikipedia:Linux|Linux]] [[Dedicated server|Dedicated Server]]s.


If you own a copy of Visual Studio 2005/2008 you'll probably want to use that, and if you're compiling for Linux you don't have a choice to make. Which leaves only the Visual C++ Express versions to choose between:
Please see [[Setting up Source SDK Base 2013 Singleplayer#Step One: Installing requirements|Installing Visual Studio 2013]] (for {{src13sp}}) or [[Setting up Source SDK Base 2013 Multiplayer#Step One: Installing requirements|Installing Visual Studio 2022]] (for {{tf2branch}}) for more information on how to install Visual Studio, as well as how newer versions of Visual Studio can be used.


; [http://download.microsoft.com/download/8/3/a/83aad8f9-38ba-4503-b3cd-ba28c360c27b/ENU/vcsetup.exe VCE2005]
== Availability ==
: Officially supported by Valve
Different versions of Visual Studio are supported between different versions of the Source SDK.
: Older technology
; [http://www.microsoft.com/express/vc/ VCE2008]
: Supported by Microsoft
: Better Vista compatibility
: Nicer user interface


Both are perfectly acceptable choices, providing for free all of the functionality needed to program and compile a mod. If you are unsure, choose 2008, as you will not have to install additional software.
{| class="standard-table plainlinks" style="width:60%"
! Version
! Engine branch
! Requirements
|-
| Visual Studio 2002
|rowspan="2"| {{src06|4.1}} and earlier
| See [[Compiling under VS2002]].
|-
| Visual Studio 2003
| See [[Compiling under VS2003]].
|-
| Visual Studio 2005
|rowspan="2"| {{astools|4.1|nt=1}}, {{src07|4.1}} and earlier
| See [[Compiling under VS2005]].
|-
| Visual Studio 2008
| See [[Compiling under VS2008]].
|-
| Visual Studio 2010
|rowspan="2"| {{astools|4.1|nt=1}}, {{src07|4.1}} and earlier</br>{{src13sp|4.1}}</br>{{src13mp|4.1}} (pre-2025)
| {{astools}}, {{src07}} and earlier: See [[Compiling under VS2010]].</br>{{src13|1}}: Add /2010 to your VPC command line
|-
| Visual Studio 2012
| {{astools}}, {{src07}} and earlier: See [[Compiling under VS2012]].</br>{{src13|1}}: Supported
|-
| Visual Studio 2013
|rowspan="4"| {{src13sp|4.1}}</br>{{src13mp|4.1}} (pre-2025)
| ''Default'' for Singleplayer only, aswell as pre-2025 Multiplayer.
|-
| Visual Studio 2015
|rowspan="3"| See [[Compiling under VS2022]].
|-
| Visual Studio 2017
|-
| Visual Studio 2019
|-
| Visual Studio 2022
| {{src13sp|4.1}}</br>{{tf2branch|4.1}}
| {{tf2branch|1}}: ''Default''. See [[Setting up Source SDK Base 2013 Multiplayer]].</br>{{src13sp|1}}: See [[Compiling under VS2022]].
|}


{{tip|[http://www.microsoft.com/visualstudio/en-us/products/2010/ Visual Studio 2010] is nearing release and features ''vastly'' improved [[wikipedia:IntelliSense|IntelliSense]]. It can compile the SDK source code after [[Compiling under VS2008|the same modifications required for VS2008]] - you should consider using the Release Candidate!}}
<br><hr><br>


== Additional SDKs ==
= GCC =
[[File:Gccegg-65.png|right|GCC logo]]
{{Industry tool|{{w|GNU Compiler Collection}}}}
The '''GNU Compiler Collection (GCC)''' is a collection of code compilers maintained by the GNU Project. '''G++''' in particular is the default compiler recommended for use with the Source SDK on Linux.


*VCE2005 users need to download the [http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&DisplayLang=en Windows SDK] (Windows 2000 users: [http://www.microsoft.com/downloads/details.aspx?familyid=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en Platform SDK]). Visual Studio and VCE2008 users do not.
== Availability ==
*If you want to create new [[shader]]s, the [http://msdn2.microsoft.com/directx/aa937788.aspx DirectX SDK] is required.
{{note|{{astools|4.1}} does not support GCC. If you want your Alien Swarm mod to run on Linux, you will need to use Proton.}}
{{todo|What about the {{tf2branch|4}}?}}
{| class="standard-table plainlinks" style="width:60%"
! Version
! Engine branch
! Requirements
|-
| GCC 4.2.x or lower
| {{src07|4.1}} and earlier
| See [[Compiling under Linux]].
|-
| GCC 4.6-4.8
|rowspan="2"| {{src13|4.1}}</br>{{tf2branch|4.1}}{{confirm}}
| See [[Source SDK 2013#Source SDK 2013 on Linux ("container" method)|Source SDK 2013 on Linux ("container" method)]].
|-
| GCC 5 or higher
| See [[Source SDK 2013#Source SDK 2013 on Linux ("container" method)|Source SDK 2013 on Linux ("container" method)]] and optional step for changing the toolchain.
|}


== See also ==
<br><hr><br>


* [[Compiling under VS2005]]
= See also =
* [[Compiling under VS2008]]
* [[Building without Visual Studio]]
* [[Compiling under Linux]]
* {{vscode|4.1}} — A rich text editor commonly used with scripts outside of the code.


[[Category:Source_SDK_FAQ]]
== External links ==
* [https://visualstudio.microsoft.com/ Visual Studio]
* [http://gcc.gnu.org/ GCC]
 
[[Category:Source SDK FAQ]]
[[Category:Programming]]
[[Category:Programming]]

Latest revision as of 22:59, 22 March 2025

English (en)Español (es)Русский (ru)Translate (Translate)
This article is about choosing a C++ code compiler. For a list of subjects which use the word "compiler", see Compiler.

You have several choices for compiling unedited variants of the Source SDK depending on which version you are using.

Visual Studio

Visual Studio logo
Visual Studio logo used from 2010-2012.
Info.png
This article or section is about an external tool that is not directly related to Valve's engines. It is not an exhaustive source of information and may only exist on this wiki for reference purposes.
Please see Wikipedia icon Visual Studio for more information on the tool itself.
This article is about the IDE recommended for use with the Source engine's C++ code. For the rich text editor commonly used with scripts, see Visual Studio Code.

Visual Studio is an Wikipedia icon Integrated development environment (IDE) developed and maintained by Microsoft. It is the default IDE recommended for use with the Source SDK on Windows. In Source 2013 Source 2013, the default version of Visual Studio used for Source engine development is Visual Studio 2013 (Visual Studio 2022 for Team Fortress 2 branch Team Fortress 2 branch). Older versions of Visual Studio are not compatible with Source 2013, and newer versions of Visual Studio will not work with Source 2013 by default.

Please see Installing Visual Studio 2013 (for Source 2013 Singleplayer) or Installing Visual Studio 2022 (for Team Fortress 2 branch) for more information on how to install Visual Studio, as well as how newer versions of Visual Studio can be used.

Availability

Different versions of Visual Studio are supported between different versions of the Source SDK.




GCC

GCC logo
Info.png
This article or section is about an external tool that is not directly related to Valve's engines. It is not an exhaustive source of information and may only exist on this wiki for reference purposes.
Please see Wikipedia icon GNU Compiler Collection for more information on the tool itself.

The GNU Compiler Collection (GCC) is a collection of code compilers maintained by the GNU Project. G++ in particular is the default compiler recommended for use with the Source SDK on Linux.

Availability

Note.pngNote:Alien Swarm - SDK Alien Swarm - SDK does not support GCC. If you want your Alien Swarm mod to run on Linux, you will need to use Proton.
Todo: What about the Team Fortress 2 branch Team Fortress 2 branch?




See also

External links