visual c++ 2005 express にした。

うまく動かないので 2005 にした。 それでもリンカーのエラーが出まくってもうダメかと思ったがなんとかできたみたい。

'hl2.exe': Loaded 'C:\Program Files\Steam\steamapps\sourcemods\nogemod\bin\client.dll', Symbols loaded.
'hl2.exe': Loaded 'C:\Program Files\Steam\steamapps\sourcemods\nogemod\bin\server.dll', Symbols loaded.

hl2.exe が自分がビルドした server.dll と client.dll をロードしているからたぶん大丈夫なはずだ。

初代half-life 2 の mod を作る場合、hl2.exe は source sdk base のやつを使わねばならない。 configuration properties -> debugging -> command:

C:\Program Files\Steam\steamapps\(steamid)\source sdk base\hl2.exe

command arguments:

-allowdebug -novid -game "C:\Program Files\Steam\steamapps\SourceMods\(modname)"
1>------ Build started: Project: client_hl2, Configuration: Debug HL2 Win32 ------
1>Linking...
1>   Creating library Debug HL2/client.lib and object Debug HL2/client.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>tier2.lib(MaterialSystemUtil.obj) : warning LNK4204: 'c:\nogemod\src\cl_dll\Debug HL2\vc80.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>tier2.lib(tier2.obj) : warning LNK4204: 'c:\nogemod\src\cl_dll\Debug HL2\vc80.pdb' is missing debugging information for referencing module; linking object as if no debug info
1>Embedding manifest...
1>Copying to destination folder
1>        1 個のファイルをコピーしました。
1>Build log was saved at "file://c:\nogemod\src\cl_dll\Debug HL2\BuildLog.htm"
1>client_hl2 - 0 error(s), 3 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

このLIBCMTがどうのこうのという警告を消そうと/NODEFAULTLIB つけたり(ignore all default libraries を yes)、libcmtd を igonore specific library に付け足したりするとはまるのだ。 うぜえよリンカー。