Skip to content

Does not seem to compile in VS2019 #31

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

Closed
martinfinke opened this issue Sep 6, 2019 · 3 comments
Closed

Does not seem to compile in VS2019 #31

martinfinke opened this issue Sep 6, 2019 · 3 comments

Comments

@martinfinke
Copy link

I can't get wise_enum to work in Visual Studio 2019 16.1.4..I'm using version 3.0.0.

My code:

WISE_ENUM(MyEnum, MyEnumCaseOne, MyEnumCaseTwo)

Error output:

1>------ Build started: Project: WiseEnumTest_App, Configuration: Debug x64 ------
1>Main.cpp
1>E:\WiseEnumTest\Source\Main.cpp(3,1): warning C4003:  not enough arguments for function-like macro invocation 'WISE_ENUM_IMPL_ARG_N'
1>E:\WiseEnumTest\Source\Main.cpp(3,1): error C2143:  syntax error: missing '}' before '('
1>E:\WiseEnumTest\Source\Main.cpp(3,1): error C2143:  syntax error: missing ')' before ','
1>E:\WiseEnumTest\Source\Main.cpp(3,1): error C2059:  syntax error: ')'
1>E:\WiseEnumTest\Source\Main.cpp(3,1): error C2143:  syntax error: missing ';' before '}'
1>E:\WiseEnumTest\Source\Main.cpp(3,1): error C2059:  syntax error: '}'
1>E:\WiseEnumTest\Source\Main.cpp(3,1): error C2059:  syntax error: '>'
1>E:\WiseEnumTest\Source\Main.cpp(3,1): error C2062:  type 'unknown-type' unexpected
1>E:\WiseEnumTest\Source\Main.cpp(6,34): error C2059:  syntax error: 'public'
1>E:\WiseEnumTest\Source\Main.cpp(7,1): error C2143:  syntax error: missing ';' before '{'
1>E:\WiseEnumTest\Source\Main.cpp(7,1): error C2447:  '{': missing function header (old-style formal list?)
1>E:\WiseEnumTest\Source\Main.cpp(97,1): error C2061:  syntax error: identifier 'WiseEnumTestApplication'
1>Done building project "WiseEnumTest_App.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've tried adding the /permissive- compiler flag, but I still get the same errors. I've also tried running create_generated.py to generate just 125 cases, but still get the same error.

Thank you again for the great work, and any help would be appreciated 😊

@quicknir
Copy link
Owner

Sorry the response has been a long time coming; I had a kid and bought a house so the last 3 months were hectic. The windows situation for wise enum has always had issues, windows pre-processor and compiler are the least compliant (IME) and I can't really easily debug it myself. If you are interested in working together a bit on the windows issues, I'll be able to be more responsive and we can work through figuring out what's causing the issues.

@samangh
Copy link
Contributor

samangh commented Feb 18, 2021

This is fixed in merge request #45

@quicknir
Copy link
Owner

I'm going to close this for now since it seems to now compile according to the CI (thanks to @samangh 's amazing work). However, I would encourage @martinfinke or anyone else to reopen this issue if it still does not work.

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

3 participants