-
Notifications
You must be signed in to change notification settings - Fork 241
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
Compiling error : initializer is not a constant #77
Comments
Does it work if you just remove those two lines? i.e. compile without the ceil and floor functions? |
yes, it works if I removed this two lines. |
Is it possible that you're compiling this as C++ instead of C? I think that may be the issue here. |
Oh, yes, I used it in my C++ project. But I didn't change the file extension from .c to .cpp, the compiler(vs 2015) supposes to compile it as C, right? |
I'm not sure about that. It probably depends on the project settings. You could add some C++ code to the file to check if it is indeed compiling as C++ or not. |
Look at this commit: 085d678 |
I used visual studio 2015 to compile tinyexpr, but I got two compile errors(initializer is not a constant) when meet
{"ceil", ceil, TE_FUNCTION1 | TE_FLAG_PURE, 0} and {"floor", floor, TE_FUNCTION1 | TE_FLAG_PURE, 0} line.
It only happens under release, but there is nothing happed under debug mode.
The text was updated successfully, but these errors were encountered: