Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCode project not found stbi_load function #66

Open
stefanJi opened this issue Sep 8, 2020 · 4 comments
Open

XCode project not found stbi_load function #66

stefanJi opened this issue Sep 8, 2020 · 4 comments

Comments

@stefanJi
Copy link

stefanJi commented Sep 8, 2020

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>
@Polytonic
Copy link
Owner

Mmm, I don't seem to have this issue locally. Which version of macOS are you running?

@stefanJi
Copy link
Author

10.15.6

@raiyansayeed
Copy link

raiyansayeed commented Sep 23, 2020

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.

@bigmat18
Copy link

bigmat18 commented Mar 8, 2024

Hi, I have the same problem, did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants