You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to add CURL through CMake and errors appears on LoadImage inside LoadTextureFromImage function. Error: argument of type "HANDLE" (aka "void *") is incompatible with parameter of type "Image" (aka "struct Image").
PS: Just noticed if I open project and quickly run project it will build and run but next time you try to run it will failed.
BTW i'm newbie at C/C++ and all this low level stuff so it could be because i did something wrong.
The text was updated successfully, but these errors were encountered:
This happens because you include Windows.h which has lots of defines.
It defines LoadImage as LoadImageA in your case which is a Windows API, while the real LoadImage you wanted to call is a raylib API with an entirely different interface.
As a temporary workaround just do this at the top after including windows.h:
#undef LoadImage
I wonder which stance the author of the library will take on this, some libs let the user deal with this, others try to undef all of the windows nonsense such as min,max and many others.
nicbarker
changed the title
CURL naming collision error
[Renderers/Raylib] CURL naming collision error
Mar 2, 2025
nicbarker
changed the title
[Renderers/Raylib] CURL naming collision error
[Renderers/Raylib] Including windows.h causes naming collision in Raylib LoadImage function
Mar 2, 2025
I tried to add CURL through CMake and errors appears on LoadImage inside LoadTextureFromImage function. Error: argument of type "HANDLE" (aka "void *") is incompatible with parameter of type "Image" (aka "struct Image").
PS: Just noticed if I open project and quickly run project it will build and run but next time you try to run it will failed.
BTW i'm newbie at C/C++ and all this low level stuff so it could be because i did something wrong.
The text was updated successfully, but these errors were encountered: