Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Emerald-Ruby
Copy link
Contributor

GCC Complaining about not including math.h still runs without the include, but a wall of "use math.h" is printed

@FintasticMan
Copy link
Contributor

One of the things Clay aims for is to not depend on the C standard library, including math.h. Could you show me what the compiler warnings are? I haven't noticed them myself.

@Emerald-Ruby
Copy link
Contributor Author

Nothing critical, honestly you can reject it, it's just a tiny thing that doesn't effect it, but my mingw64 GCC compiles the SDL2 renderer with an implicit math.h, I am on windows too

image

@nicbarker
Copy link
Owner

Hey @Emerald-Ruby - you're absolutely right, there is an implicit usage of math.h functions in the SDL2 renderer. We're totally fine with having standard lib usage in the renderers and examples outside of the core clay.h, thanks for catching this!

@nicbarker nicbarker changed the title math.h include missing cause lots of warning logs [Renderers/SDL2] Added explicit include of math.h in SDL2 renderer Mar 17, 2025
@nicbarker nicbarker merged commit d5af2c3 into nicbarker:main Mar 17, 2025
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

Successfully merging this pull request may close these issues.

3 participants