Handmade Hero»Forums»Code
1 posts
Handmade Hero Day 2 Linker Error When Libraries Are Included in build.bat file.

Following the series through doom emacs ran into a problem when I try compiling the code it gives me linker errors which I've tried fixing by changing from standard to asnii functions. It compiled fine until I included the paint functions into my MainWindowsCallback function. I don't know what to do it starts fine in VS but the paint functions don't work.

image.png

image.png

image.png

Mārtiņš Možeiko
2559 posts / 2 projects
Handmade Hero Day 2 Linker Error When Libraries Are Included in build.bat file.

The linker errors happen because you're compiling win32_handmade.cpp file twice. First without user32.lib (line 4), then second time with user32.lib (line 5). And the first time is when these errors happen.