planetis-m / naylib

Yet another raylib Nim wrapper
MIT License
181 stars 10 forks source link

Calling reset on an Image breaks compilation on Windows #90

Closed jehoz closed 9 months ago

jehoz commented 9 months ago

Not sure if this is the case for other data types as well, but it seems like calling reset on an Image variable (like in the heightmap example) causes a bunch of conflicting types for '...' errors (I am guessing because of some naming conflicts between raylib.h and windows.h that weren't caught by the mangle_names patch?) If I take that line out of of the example it compiles and runs just fine.

I tried to investigate more, but I'm still pretty new to both raylib and nim in general so it might be a little over my head. I see that the normal =destroy destructor for Images just calls unloadImage, is reset doing something else here?

planetis-m commented 9 months ago

I am assuming these are the same errors as posted in #89

jehoz commented 9 months ago

Yep, looks like the same ones! Sorry, didn't realize there was already an issue with the same errors.