munificent / craftinginterpreters

Repository for the book "Crafting Interpreters"
http://www.craftinginterpreters.com/
Other
8.75k stars 1.03k forks source link

Error C2371 'Chunk': redefinition; different basic types #1016

Closed rkamarowski closed 2 years ago

rkamarowski commented 2 years ago

Windows 11 Using Visual Studio 2022

I'm new to c programming.

Chapter 14, and I'm going through it step by step. The Getting Started part went fine. Disassembling Chunks is where I'm getting the above error. In the debug.h file, as soon as I enter #include "chunk.h" the error shows up. I completed the Disassembling Chunks section, and went back and commented out sections of code to see when the error showed up. I've double checked all the code. And looked up the error. Any help would be appreciated.

Bob K.

rkamarowski commented 2 years ago

Found the error.

rkamarowski commented 2 years ago

Found the error. Chunk struct was not within the endif.