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

stb_image.h path inclusion for using shared libraries #6481

Open
Kreijstal opened this issue Jan 17, 2024 · 4 comments
Open

stb_image.h path inclusion for using shared libraries #6481

Kreijstal opened this issue Jan 17, 2024 · 4 comments

Comments

@Kreijstal
Copy link
Contributor

Kreijstal commented Jan 17, 2024

the file src/webots/nodes/WbBackground.cpp uses stb_image.h instead of stb/stb_image.h this is if you package webots for distros where stb is provided :)
Overv/VulkanTutorial#251

also in file
src/controller/c/g_image.c

@Kreijstal
Copy link
Contributor Author

One way to solve this is to create another directory on stb, or to change the stb import, which one do you think is more appropiate?

@omichel
Copy link
Member

omichel commented Jan 19, 2024

I would prefer to avoid creating some webots/src/stb/stb folder as it doesn't look very nice.

@Kreijstal
Copy link
Contributor Author

we could also change the line in src/webots/Makefile of
STB_INCLUDE = -isystem $(WEBOTS_PATH)/src/stb
to STB_INCLUDE = -isystem $(WEBOTS_PATH)/src

but I think the nested stb is nicer, the reason is that on 2018 there was no package in most systems, but now there is so systems like windows (msys2) you can simply just use mingw-w64-x86_64-stb, on ubuntu/debian there is libstb and libstb-dev
and it compiles as it is without subcloning just using make :) (of course there is mingw-w64-x86_64-glm too)

@omichel
Copy link
Member

omichel commented Jan 22, 2024

OK, then we should probably remove this stb folder and use the one from the system. We should add it to the dependencies, so that the right version gets installed:

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

No branches or pull requests

2 participants