I trying studying in the learn opengl site and i have been in the chapter of loading models but the implementation of the code is not going ok because of the stb_image.h, when i try to put the library in the model.h file it does not work, giving the error of multiple initialization.
scr/aplication.cpp
#include "../Model/Model.h"
...
scr/stb_image.cpp
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
Model/Model.h
#include <stb_image.h>
...
In the previous chapters i was using.
scr/aplicaition.cpp
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
...
But i checked the code of the learn openGl and corrected, but i don’t understand why the stb_image doesn’t work has other.h and gives this liking error when i try to implement in different files.
Torta de limão is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.