Kobbersvard / C-Hotloading

Example of MSVC makefile project for hotloading C with intellisense/debugger compatability

Home Page:https://randygaul.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C Hotloading

Quick example of compiling a "game's" main loop into a DLL with the ability to reload the DLL at run-time whenever the DLL has changed. A batch file is used to allow compilation while the debugger is attached to the main executable. Idea taken from the Handmade Hero videos + forums.

I've included notes on how to add a hotkey (I used alt + f5) to recompile while running the executable from within Visual Studio, even while the debugger is attached.

Windows only demo. Batch file setup for MSVC 2013 (v12); easily modifiable for other version.

Instructions

  • Open solution
  • f5
  • Edit game.cpp
  • Alt + f5 (after setting up the hotkey, see notes folder)

About

Example of MSVC makefile project for hotloading C with intellisense/debugger compatability

https://randygaul.net


Languages

Language:C++ 88.9%Language:Batchfile 11.1%