I want to load images using stb_image. I downloaded stb_image.h
from https://github.com/nothings/stb. When I run the code:
string file="image.png";
int width,height,components;
unsigned char *imageData = stbi_load(file.c_str(),
&width, &height, &components, STBI_rgb_alpha);
i get the following errors:
Main.cpp:(.text+0xa14): undefined reference to `stbi_load'
Main.cpp:(.text+0xb74): undefined reference to `stbi_image_free'