Glitter
Glitter copied to clipboard
XCode project not found stbi_load function
I hava used cmake -G "Xcode" .. to generate a xcode project and usage as follow:
u_char *data = stbi_load(imagePath, &width, &height, &nrChannels, 0);
but compiler make a error: No matching function for call to 'stbi_load'
I have changed glitter.hpp to:
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
Mmm, I don't seem to have this issue locally. Which version of macOS are you running?
10.15.6
Did you add
#define STB_IMAGE_IMPLEMENTATION
to the top of your main.cpp file? I was getting a similar error but that fixed it for me.
Hi, I have the same problem, did you solve it?