Darren Sweeney
2 posts
Rendering Engineer at Frostbite.
Edited by Darren Sweeney on Reason: Initial post
I'm trying to build handmade hero but get this error. I follow the instruction that was on the GitHub link, I'm using visual studio 2017. Does anyone have any ideas on how to fix this?

'ctime' is not recognized as an internal or external command,
operable program or batch file.
test_png.cpp
d:\handmade\code\handmade_shared.h(1005,14): warning C4244: 'argument': conversion from 'u64' to 'memory_index', possible loss of data
hhfont.cpp
Simon Anciaux
1051 posts
Which day are you trying to compile ? I can compile day 533 with Visual Studio 2017 without warnings or errors.

For the ctime error, you can add ctime to the path or edit build.bat to add the full path to ctime.exe. The exe is in the zip in the ctime folder.
 1 2 3 4 W:\handmade\ctime\ctime.exe -begin handmade_hero.ctm REM At the end of the file W:\handmade\ctime\ctime.exe -end handmade_hero.ctm %LastError% 

Did you call vcvarsall.bat with x64 as an argument to compile for a 64bit target ? Something like:
 1 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 

It should display this if you do (important to have the 'x64' at the end).
 1 2 3 4 5 ********************************************************************** ** Visual Studio 2017 Developer Command Prompt v15.4.1 ** Copyright (c) 2017 Microsoft Corporation ********************************************************************** [vcvarsall.bat] Environment initialized for: 'x64' 

For the warnings you can add "-wd4018 -wd4244" to the CommonCompilerFlags in build.bat but it's probably better to fix those in the code.
Darren Sweeney
2 posts
Rendering Engineer at Frostbite.