Handmade Network»Forums
zub
2 posts
Issues with compiling
Edited by zub on

Trying to compile the latest pull from handmadehero github and running into the below errors:


** Visual Studio 2017 Developer Command Prompt v15.9.50 ** Copyright (c) 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional>W:

W:>cd handmade

W:\handmade>cd code

W:\handmade\code>build.bat 'ctime' is not recognized as an internal or external command, operable program or batch file. hhsphere.cpp win32_handmade_opengl.cpp Creating library win32_handmade_opengl.lib and object win32_handmade_opengl.exp handmade.cpp w:\handmade\code\handmade_brain.cpp(560,17): error C2065: 'traversable_reference': undeclared identifier w:\handmade\code\handmade_brain.cpp(560,50): error C2146: syntax error: missing ';' before identifier 'Traversable' w:\handmade\code\handmade_brain.cpp(560,39): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(561,63): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(561,20): error C3861: 'GetClosestTraversable': identifier not found w:\handmade\code\handmade_brain.cpp(563,33): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(563,23): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_brain.cpp(569,27): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_brain.cpp(569,87): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(576,79): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_brain.cpp(576,30): error C3861: 'GetSimSpaceTraversable': identifier not found w:\handmade\code\handmade_brain.cpp(583,25): error C2065: 'traversable_reference': undeclared identifier w:\handmade\code\handmade_brain.cpp(583,64): error C2146: syntax error: missing ';' before identifier 'TargetTraversable' w:\handmade\code\handmade_brain.cpp(583,47): error C2065: 'TargetTraversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(585,1): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_brain.cpp(585,76): error C2065: 'TargetTraversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(584,28): error C3861: 'GetClosestTraversableAlongRay': identifier not found w:\handmade\code\handmade_brain.cpp(587,55): error C2065: 'TargetTraversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(614,17): error C2065: 'traversable_reference': undeclared identifier w:\handmade\code\handmade_brain.cpp(614,50): error C2146: syntax error: missing ';' before identifier 'Traversable' w:\handmade\code\handmade_brain.cpp(614,39): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(615,71): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(615,20): error C3861: 'GetClosestTraversable': identifier not found w:\handmade\code\handmade_brain.cpp(619,38): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_brain.cpp(619,27): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_brain.cpp(621,61): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_brain.cpp(622,31): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_brain.cpp(622,91): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_entity.cpp(118,80): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(118,29): error C3861: 'GetSimSpaceTraversable': identifier not found w:\handmade\code\handmade_entity.cpp(119,31): error C3861: 'GetSimSpaceTraversable': identifier not found w:\handmade\code\handmade_entity.cpp(142,53): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(151,80): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(151,29): error C3861: 'GetSimSpaceTraversable': identifier not found w:\handmade\code\handmade_entity.cpp(152,31): error C3861: 'GetSimSpaceTraversable': identifier not found w:\handmade\code\handmade_entity.cpp(226,13): error C2065: 'entity_traversable_point': undeclared identifier w:\handmade\code\handmade_entity.cpp(226,39): error C2065: 'BoostTo': undeclared identifier w:\handmade\code\handmade_entity.cpp(226,94): error C2039: 'AutoBoostTo': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(226,49): error C3861: 'GetTraversable': identifier not found w:\handmade\code\handmade_entity.cpp(227,16): error C2065: 'BoostTo': undeclared identifier w:\handmade\code\handmade_entity.cpp(230,64): error C2039: 'TraversableCount': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(233,21): error C2065: 'entity_traversable_point': undeclared identifier w:\handmade\code\handmade_entity.cpp(233,47): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_entity.cpp(234,46): error C2039: 'Traversables': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(235,65): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_entity.cpp(235,40): error C3861: 'GetEntityByID': identifier not found w:\handmade\code\handmade_entity.cpp(238,65): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(240,1): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(241,1): error C2039: 'AutoBoostTo': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(239,28): error C2660: 'TransactionalOccupy': function does not take 2 argumentsw:\handmade\code\handmade_sim_region.cpp(472,14): note: see declaration of 'TransactionalOccupy' w:\handmade\code\handmade_entity.cpp(274,21): error C2065: 'traversable_reference': undeclared identifier w:\handmade\code\handmade_entity.cpp(274,54): error C2146: syntax error: missing ';' before identifier 'Traversable' w:\handmade\code\handmade_entity.cpp(274,43): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_entity.cpp(275,67): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_entity.cpp(276,46): error C2065: 'TraversableSearch_ClippedZ': undeclared identifier w:\handmade\code\handmade_entity.cpp(275,24): error C3861: 'GetClosestTraversable': identifier not found w:\handmade\code\handmade_entity.cpp(278,61): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(279,43): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity.cpp(279,45): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(10,84): error C2061: syntax error: identifier 'traversable_reference' w:\handmade\code\handmade_world_mode.cpp(13,46): error C2065: 'StandingOn': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(13,12): error C3861: 'GetSimSpaceTraversable': identifier not found w:\handmade\code\handmade_world_mode.cpp(33,21): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_world_mode.cpp(33,23): error C2065: 'StandingOn': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(36,21): error C2065: 'BrainID': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(38,21): error C2065: 'BrainID': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(40,22): error C2065: 'BrainID': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(134,21): error C2065: 'traversable_reference': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(134,54): error C2146: syntax error: missing ';' before identifier 'Traversable' w:\handmade\code\handmade_world_mode.cpp(134,43): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(135,71): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(136,46): error C2065: 'TraversableSearch_Unoccupied': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(135,24): error C3861: 'GetClosestTraversable': identifier not found w:\handmade\code\handmade_world_mode.cpp(139,57): error C2065: 'Traversable': undeclared identifier w:\handmade\code\handmade_world_mode.cpp(500,13): error C3861: 'GetEntityByID': identifier not found w:\handmade\code\handmade_edit_grid.cpp(248,9): error C2065: 'traversable_reference': undeclared identifier w:\handmade\code\handmade_edit_grid.cpp(248,35): error C2146: syntax error: missing ';' before identifier 'Ref' w:\handmade\code\handmade_edit_grid.cpp(248,31): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_edit_grid.cpp(249,74): error C2039: 'TraversableCount': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_edit_grid.cpp(251,13): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_edit_grid.cpp(252,53): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(183,84): error C2061: syntax error: identifier 'traversable_reference' w:\handmade\code\handmade_entity_gen.cpp(185,48): error C2065: 'StandingOn': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(185,17): error C3861: 'GetSimSpaceTraversable': identifier not found w:\handmade\code\handmade_entity_gen.cpp(190,84): error C2061: syntax error: identifier 'traversable_reference' w:\handmade\code\handmade_entity_gen.cpp(192,46): error C2065: 'StandingOn': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(193,63): error C2039: 'Occupying': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_entity_gen.cpp(193,65): error C2065: 'StandingOn': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(221,5): error C2065: 'traversable_reference': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(221,31): error C2146: syntax error: missing ';' before identifier 'Ref' w:\handmade\code\handmade_entity_gen.cpp(221,27): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(224,9): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(231,52): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(242,5): error C2065: 'traversable_reference': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(242,31): error C2146: syntax error: missing ';' before identifier 'Ref' w:\handmade\code\handmade_entity_gen.cpp(242,27): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(245,9): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_entity_gen.cpp(252,52): error C2065: 'Ref': undeclared identifier w:\handmade\code\handmade_room_gen.cpp(118,34): error C2039: 'TraversableCount': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_room_gen.cpp(119,29): error C2039: 'Traversables': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_room_gen.cpp(120,36): error C2039: 'Traversables': is not a member of 'entity'w:\handmade\code\handmade_entity.h(202): note: see declaration of 'entity' w:\handmade\code\handmade_room_gen.cpp(120,36): fatal error C1003: error count exceeds 100; stopping compilation Generating Code... Compiling... handmade_msvc.c Generating Code... win32_handmade.cpp Generating Code... Compiling... handmade_msvc.c Generating Code... Creating library win32_handmade.lib and object win32_handmade.exp win32_renderer_test.cpp 'ctime' is not recognized as an internal or external command, operable program or batch file.

This is my first time trying to compile the latest as where before I would start at the beginning of the project on Day 1 and work my way through the lessons.

Please let me know if I can provide any other information that can help, thanks!

Mārtiņš Možeiko
2443 posts / 2 projects
Issues with compiling

Casey sometimes leaves code in a bit broken state because he's working on some larger changes and will finish the changes in the next episode.

Try using previous day - git checkout day662 and then it should build just fine.

zub
2 posts
Issues with compiling
Edited by zub on

Oh thanks! I didn't think of that.

That makes so much sense and it did work.