Repository navigation
Conversation
…mpiler error on VS2017 and VS2019.
|
Can you help me understand what does this exactly enable? Isn't building with MSVC already supported? I can build without issue (well, other than the million of warnings) with VS 2019 Community. |
|
Hm, that's strange. I get this error on the first line where restrict is used: I checked this on one computer with VS2017 and on another with VS2019 |
|
I am not sure in what version this was added, but MSVC does support restrict with /std:c11. |
|
Well, I updated my MSVC 2017 and also updated the language standard in the project settings, but I still get the same error. But if I'm the only one with this issue I guess you can close it. |
|
@grahameth are you using CMake? If so, check the compile_commands.json file in the build directory to find the exact build command. Maybe it's not compiling ggml.c as C11 (or newer). C++ or older C versions won't recognize the keyword. |
|
|
|
@grencez I don't find a generated file named "compile_commands.json" anywhere. But anyway, I just set up a VM with a fresh install of VS2022 and cmake and there it indeed works. I still don't understand why it doesn't work on my machines, but it's not worth the time to investigate this. |
Use __restrict instead of restrict on MS compiler to prevent compiler error on VS2017 and VS2019.