Standard setup for writing C inspired by Casey Muratori, Ryan Fleury, Mr. 4th Programmer, and others in the handmade community.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 2 nedēļām
pirms 2 nedēļām
pirms 2 nedēļām
123456789101112131415161718192021222324252627
  1. @echo off
  2. if NOT EXIST .\target mkdir .\target
  3. set commonLinkerFlags=-opt:ref
  4. set commonCompilerFlags=^
  5. -MT %= Make sure the C runtime library is statically linked =%^
  6. -Gm- %= Turns off incremental building =%^
  7. -nologo %= No one cares you made the compiler Microsoft =%^
  8. -Oi %= Always use intrinsics =%^
  9. -EHa- %= Disable exception handling =%^
  10. -GR- %= Never use runtime type info from C++ =%^
  11. -WX -W4 -wd4201 -wd4100 -wd4189 -wd4505 %= Compiler warnings, -WX warnings as errors, -W4 warning level 4, -wdXXXX disable warning XXXX =%^
  12. -DAPP_DEBUG=0 -DENABLE_ASSERT=1 -DOS_WINDOWS=1 %= Custom #defines =%^
  13. -D_CRT_SECURE_NO_WARNINGS=1^
  14. -FC %= Full path of source code file in diagnostics =%^
  15. -Zi %= Generate debugger info =%
  16. pushd .\target
  17. cl %commonCompilerFlags% -Fe:.\app.exe ..\app.cpp /link -incremental:no %commonLinkerFlags%
  18. popd
  19. exit /b
  20. :error
  21. echo Failed with error #%errorlevel%.
  22. exit /b %errorlevel%