-
Can I receive explanation why do I have to generate static library file manually and why it wasn't possible to add lib folder with the file like libglad.a for the generation process? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Two main reasons: Glad is not supposed to be built/ran everytime you build your application. The intended way is to include the generated code in your project and only update it (or re-generate it), when you actually need to do that (one of the reasons I dont really like the CMake integration). This is also why there is a web generator, so you don't even have to have Python installed. The other reason is, it simply would not be possible. Compiling code is different on basically every system (that's why autoconfigure, cmake and all these other systems exist). It would be impossible for me to actually compile the code in a way it works everywhere. |
Beta Was this translation helpful? Give feedback.
-
To generate a static library
Now, follow these steps to create the static library manually:
Now, you have successfully generated the Additionally, make sure you include the appropriate GLAD header in your source code. For example, in your C/C++ source files, include the following line at the top: #include <glad/glad.h> With these steps completed, you should be able to compile and link your OpenGL programs with the manually generated |
Beta Was this translation helpful? Give feedback.
Two main reasons:
Glad is not supposed to be built/ran everytime you build your application. The intended way is to include the generated code in your project and only update it (or re-generate it), when you actually need to do that (one of the reasons I dont really like the CMake integration). This is also why there is a web generator, so you don't even have to have Python installed.
The other reason is, it simply would not be possible. Compiling code is different on basically every system (that's why autoconfigure, cmake and all these other systems exist). It would be impossible for me to actually compile the code in a way it works everywhere.