Closed amrezaee closed 2 years ago
probably this is related to https://github.com/microsoft/STL/pull/2148
I assume this is the same issue as here: https://github.com/Dav1dde/glad/issues/371
I don't understand the problem, glad does not include any STL headers, the only include which maybe could be problematic is windows.h
.
I setup MSVC 2022 with an example project and it compiles without issues:
Can you setup a minimal example I can just import?
I just included glad.h in a precompiled header and added that pch with target_precompile_headers function in cmake.
OK i think i found the problem. The problem is that precompiling glad.h with other headers which include STL headers causes that error. in glad.c there is an "#include<glad/glad.h>" which uses that pch with STL headers instead of glad.h file. and msvc generates error because STL headers included in glad.c which is a c source file.
To reproduce the error include glad.h and a random STL header in a pch and use that pch in your program.
OK I'll use glad2 which has header only option which is easier to precompile.
I don't think there is anything I can do about that in glad.
Hi. glad on visual studio 2022 produces following error: "fatal error C1189 c++ compiler expected in yvals_core.h" I changed glad.c to glad.cpp and it fixed the problem. (my project is c++) I think the problem is that glad.c includes a header file which contains "yvals_core.h" and compiling that produces above error. glad config: opengl core profile 4.6 gles2 3.1 ARB and EXT and AMD extensions. generate loader checked. I use cmake.