Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger failing to compile on Windows #103

Open
hexactinal opened this issue Dec 5, 2023 · 0 comments
Open

Logger failing to compile on Windows #103

hexactinal opened this issue Dec 5, 2023 · 0 comments

Comments

@hexactinal
Copy link
Contributor

I was just trying to bring all the changes in group 4's repo to hexactinal/main, but I ran into this compiler error:

PS C:\Users\jacev\github\cse_491_fall_2023\build> cmake --build . --target test-unit-worlds-Language
[ 94%] Built target Catch2
[ 97%] Built target Catch2WithMain
[ 97%] Building CXX object tests/unit/Worlds/CMakeFiles/test-unit-worlds-Language.dir/Language.cpp.obj
In file included from C:/msys64/mingw64/include/windows.h:71,
                 from C:/Users/jacev/github/cse_491_fall_2023/third_party/PEGTL/include/tao/pegtl/internal/mmap_file_win32.hpp:2
                 from C:/Users/jacev/github/cse_491_fall_2023/third_party/PEGTL/include/tao/pegtl/internal/mmap_file.hpp:15,
                 from C:/Users/jacev/github/cse_491_fall_2023/third_party/PEGTL/include/tao/pegtl/mmap_input.hpp:16,
                 from C:/Users/jacev/github/cse_491_fall_2023/third_party/PEGTL/include/tao/pegtl/file_input.hpp:17,
                 from C:/Users/jacev/github/cse_491_fall_2023/third_party/PEGTL/include/tao/pegtl.hpp:28,
                 from C:/Users/jacev/github/cse_491_fall_2023/source/Worlds/Language.hpp:9,
                 from C:\Users\jacev\github\cse_491_fall_2023\tests\unit\Worlds\Language.cpp:14:
C:/Users/jacev/github/cse_491_fall_2023/source/core/EasyLogging.hpp:14:45: error: expected identifier before numeric constant
   14 | enum class LogLevel { DEBUG, INFO, WARNING, ERROR, NA };
      |                                             ^~~~~
C:/Users/jacev/github/cse_491_fall_2023/source/core/EasyLogging.hpp:14:45: error: expected '}' before numeric constant
// more compiler errors omitted

I think that this may be due to ERROR being a predefined macro on Windows, although I could be wrong. I did a find-and-replace from LogLevel::ERROR to LogLevel::ERR and this seemed to work, but you might want to test this on other operating systems before incorporating into the class branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant