Compiling under VS2010: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) (rv that is all in the 2008 article) |
No edit summary |
||
Line 24: | Line 24: | ||
Fixes: | Fixes: | ||
#Cannot locate "gl/glaux.h" - this library is not even used anywhere, why a reference to it still exists is beyond me. It also seems to be obsolete. To get around this error simply comment out the line "#include <gl/glaux.h>" inside glview.cpp under the Glview project. Secondly right-click on the project Glview and go to Properties, then find Configuration Properties->Linker->Input and under Additional Dependencies remove the text "glaux.lib;" | #Cannot locate "gl/glaux.h" - this library is not even used anywhere, why a reference to it still exists is beyond me. It also seems to be obsolete. To get around this error simply comment out the line "#include <gl/glaux.h>" inside glview.cpp under the Glview project. Secondly right-click on the project Glview and go to Properties, then find Configuration Properties->Linker->Input and under Additional Dependencies remove the text "glaux.lib;" | ||
#"error LNK2005: ... already defined in memoverride.obj" - this one is simple to deal with, and will probably occur in one or two projects. For each affected project simply right-click on it, go to Properties, then find Configuration Properties->Linker->Command Line and in the "Additional Options" text box add the following: "/FORCE:MULTIPLE" | #"error LNK2005: ... already defined in memoverride.obj" - this one is simple to deal with, and will probably occur in one or two projects. For each affected project simply right-click on it, go to Properties, then find Configuration Properties->Linker->Command Line and in the "Additional Options" text box add the following: "/FORCE:MULTIPLE" | ||
#Linker Errors relating to LIBC, LIBCMT, LIBCD, LIBCMTD, - Go to the client project properties -> Linker -> Ignore Specific Default Libraries -> and enter "libc;libcmtd;libcd;" without the quotation marks. Navigate to the same place in the server project properties and enter "libcd;libcmtd", again without the quotations. | |||
== Compiling Under Linux == | == Compiling Under Linux == |
Revision as of 11:02, 2 September 2010
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
- Follow the instructions for fixing debug compiles in VS2008, which apply here as well.
- 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:
- hud_locator.cpp
- hud_credits.cpp
- hud_flashlight.cpp
Fixing Other Compiling Errors
Fixes:
- Cannot locate "gl/glaux.h" - this library is not even used anywhere, why a reference to it still exists is beyond me. It also seems to be obsolete. To get around this error simply comment out the line "#include <gl/glaux.h>" inside glview.cpp under the Glview project. Secondly right-click on the project Glview and go to Properties, then find Configuration Properties->Linker->Input and under Additional Dependencies remove the text "glaux.lib;"
- "error LNK2005: ... already defined in memoverride.obj" - this one is simple to deal with, and will probably occur in one or two projects. For each affected project simply right-click on it, go to Properties, then find Configuration Properties->Linker->Command Line and in the "Additional Options" text box add the following: "/FORCE:MULTIPLE"
- Linker Errors relating to LIBC, LIBCMT, LIBCD, LIBCMTD, - Go to the client project properties -> Linker -> Ignore Specific Default Libraries -> and enter "libc;libcmtd;libcd;" without the quotation marks. Navigate to the same place in the server project properties and enter "libcd;libcmtd", again without the quotations.
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.