Talk:Compiling under VS2010
It should be noted that it seems to have trouble with the new Execute after / before options in the custom build, i recommend using: "Execute after: PostBuildEvent"
Also, i use Environment variables to copy files to the right mod folder, makes piece of code cleaner ;) --Neico 12:18, 14 March 2010 (UTC)
- If I remember right I tried using Execute After: PostBuildEvent and Execute After: Build and ran into the same problem, IE: It would sometimes decide it didn't want to copy the files, despite the fact that it was compiling changes that I had made. My alternative solution is obviously pretty inelegant. I have no idea how to use use environment variables though, I will have to look into that. -Sarkahn
I just came across a solution for the Custom Build Step not working: in the Output field, add a non-existent file path and it will always compile the Custom Build Step (this looks not like a permanent solution but does the trick for the time being) --Neico 18:41, 10 August 2010 (UTC)
After being frustrated by this problem for a long time, I discovered that it is, in fact, a VS 2010 bug, and MS is not planning on fixing it until the next release of VS. Go figure. They recommend adding $(TargetPath) to the list of Additional Dependencies as a workaround, which should make the build step do what it was intended to - only copy the DLLs after they've been modified. --Nkitten 22:59, 25 January 2011 (UTC)
Unable to Compile
When I try to Build my Mod, I get this Error
1>cl : Command line error D8016: '/ZI' and '/Ox' command-line options are incompatible
How do I fix that? --Adam.gamedev 21:15, 30 May 2010 (UTC)
When i try to compile i get an error about the missing weapon_basesdk.h file (it is totally missing from the project and not resent in the directory). I'm using Source SDK 2007 with the "Start mod from scratch".
--Gravity_0 11:03, 5 July 2010 (UTC)
When I tried compiling my source in VC++ 2010 Express, I get a whole bunch of these errors for various .obj files
npc_antlion.obj : error LNK2001: unresolved external symbol "void __cdecl RemoveEntityFromDarknessCheck(class CBaseEntity *)" (?RemoveEntityFromDarknessCheck@@YAXPAVCBaseEntity@@@Z)
I haven't modified the source at all except as the config articles tell be to, except I changed a
#include "episodic/ai_behavior_passenger_companion.h" G33k0ry 03:18, 6 January 2011 (UTC)
- I'm pretty sure that RemoveEntityFromDarknessCheck is an episodic function. Are you building that project? --TomEdwards 11:39, 6 January 2011 (UTC)
Edit and Continue
Anyone got Edit and Continue working for VS2010? The option to apply code changes is simply grayed out, and if you tried to break and edit code while the game is running, VS will tell you "the source file has changed. it no longer matches the version of the file used to build the application being debugged."