Talk:Compiling under VS2008: Difference between revisions
Dave Gomboc (talk | contribs) |
(Fix debug compilation) |
||
Line 75: | Line 75: | ||
To compile xwad and possibly other projects cleanly with VS2008, it's necessary to specify _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS as compilation options. This can be done under Configuration Properties | C/C++ | Preprocessor | Preprocessor Definitions. | To compile xwad and possibly other projects cleanly with VS2008, it's necessary to specify _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS as compilation options. This can be done under Configuration Properties | C/C++ | Preprocessor | Preprocessor Definitions. | ||
== Fix debug compilation == | |||
wouldn't this code be better to use instead of just commenting it out? | |||
#if defined( _DEBUG ) && _MSC_VER < 1500 | |||
// wrapper which passes no debug info; not available in debug | |||
void __cdecl _invalid_parameter_noinfo(void) | |||
{ | |||
Assert(0); | |||
} | |||
#endif /* defined( _DEBUG ) */ |
Revision as of 01:41, 16 August 2008
No need for the document to be signed. Conclusion has been removed due to irrelevance. - jsynnott
Compiling in Debug mode
I always thought you shouldn't ever compile in Debug? Did someone fiddle with the text? —Unsigned comment added by Fabbecool (talk • contribs) Always sign your posts with four tildes (~~~~)
- I extracted your own fiddle (the above) from the article and moved it here. The wiki markup for comments is "<!-- comment -->"; starting a line with "//" doesn't hide it. --Tourorist 07:45, 13 Feb 2008 (PST)
Trade of words?
If you are using the Orange box source code, you will need to copy Game_HL2MP-2005.sln, game\client\server_hl2mp-2005.vcproj and game\server\client_hl2mp-2005.vcproj and change the 2005 to 2008. --Durub 20:23, 16 Feb 2008 (PST)
- At 15:57, 19 Feb 2008 (PST) Csteinhoff suggested:
If you are using the Orange box source code, you will need to copy Game_HL2MP-2005.sln, game\client\client_hl2mp-2005.vcproj and game\server\server_hl2mp-2005.vcproj and change the 2005 to 2008.
--Etset 16:44, 19 Feb 2008 (PST)
Check out this Bug
If you use Visual Studio Express 2008 you will need to check out this bug report......
http://developer.valvesoftware.com/cgi-bin/bugzilla/show_bug.cgi?id=214
I contains a fix that you will need to finish the client compile. --Csteinhoff 19:13, 20 Feb 2008 (PST)
- This bug exists for me, but the fix does not work. It generates 2520 errors. To fix the errors, you must remove this from the "Configuration Properties/Linker/Command Line" tab for Client_HL2:
/FORCE:MULTIPLE /NODEFAULTLIB:LIBCMT
Kflorence 13:43, 26 Feb 2008 (PST)
Compiler Error C2733
I got this error
C:\vs9\vc\include\intrin.h(847) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed C:\vs9\vc\include\intrin.h(847) : see declaration of '_interlockedbittestandset' C:\vs9\vc\include\intrin.h(848) : error C2733: second C linkage of overloaded function '_interlockedbittestandreset' not allowed C:\vs9\vc\include\intrin.h(848) : see declaration of '_interlockedbittestandreset'
- I second this. I got it when trying to compile Orange Box code. It's very annoying >:(. Please find a way to fix it. --Kohan 13:51, 15 Mar 2008 (PDT)
fixed.... Just comment lines
__MACHINEI(unsigned char _interlockedbittestandset(long volatile *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long volatile *a, long b))
in C:\vs9\vc\include\intrin.h and remove
/FORCE:MULTIPLE /NODEFAULTLIB:LIBCMT
It's no longer needed to install platform sdk or windows because they are already in VC, so commenting the lines above is no longer needed but /FORCE:MULTIPLE and /NODEFAULTLIB:LIBCMT needs to be removed
Error in Output Destination for Client (HL2MP)
There seems to be a slight error in the Outputs field (Properties > Custom Build Step > General > Outputs), the ";" is creating trouble when copying to destination.
You can get around this by removing the ";" and putting the second path on a new line (as in Server (HL2MP) )
Also, after running into the error a bin "file" may have been created in the destination folder, that will prevent the bin folder from being created. This bin "file" should be deleted before subsequent attempts.
(Using VEC++2008) --Hsadan 19:16, 25 Mar 2008 (PDT)
Potential issues with instructions as of July 16, 2008
I did not find a server/memoverride.cpp file with which to comment out the void __cdecl _invalid_parameter_noinfo(void) function from. However, there existed a client/memoverride.cpp file, so I commented the function out from there. This allowed me to build without link errors. [I am using VS2008 SP1beta.]
Also, it turns out that I did not have to edit client/c_vguiscreen.cpp (again, using VS2008 SP1beta).
However, I do still get a link warning: 2>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library Unfortunately, I do not know how to resolve this warning. When I went to set Linker | Input | Ignore Specific Library to "libc;libcd;libcmtd;limcmt" (adding libcmt) for Server Debug, I received 8258 errors!
One must ensure that a [MY MOD]/bin directory exists. If it does not, then the copying of the client.dll, client.pdb, server.dll, and server.pdb files fails because each copy creates the filename "bin" within the mod directory.
To compile xwad and possibly other projects cleanly with VS2008, it's necessary to specify _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS as compilation options. This can be done under Configuration Properties | C/C++ | Preprocessor | Preprocessor Definitions.
Fix debug compilation
wouldn't this code be better to use instead of just commenting it out?
#if defined( _DEBUG ) && _MSC_VER < 1500 // wrapper which passes no debug info; not available in debug void __cdecl _invalid_parameter_noinfo(void) { Assert(0); } #endif /* defined( _DEBUG ) */