I've been having problems implementing raygui 4 in my current raylib project in C++, each time I try to build it the terminal shows several lines like this for several functions inside raygui.h:
[build] C:/path../to../project../src/raygui.h:2839: multiple definition of `GuiValueBox'; CMakeFiles\RayDraw.dir/objects.a(gui.cpp.obj):C:/path../to../project../src/raygui.h:2839: first defined here
And so on for multiple Gui functions.
I implemented raygui on its own header file kind of like this:
And a source file where I include the header and define the draw function. I tried changing RAYGUI_IMPLEMENTATION to RAYGUI_STATIC but that just makes makes the functions invisible to the compiler
I'm not sure if this is related, but I'm also getting a bunch of warnings about enum mismatches:
enumerated mismatch in conditional expression: 'GuiControlProperty' vs 'GuiDefaultProperty' [-Wenum-compare]
They seem to come from different places in raygui.h from these calls, which return values from two different enums depending on the result:
This is so Confusing!!! The Readme says you only need to define RAYGUI_IMPLEMENTATION once yet half the functions are only defined under RAYGUI_IMPLEMENTATION... Aghhhh!!!!
I've been having problems implementing raygui 4 in my current raylib project in C++, each time I try to build it the terminal shows several lines like this for several functions inside
raygui.h
:And so on for multiple Gui functions.
I implemented raygui on its own header file kind of like this:
And a source file where I include the header and define the draw function. I tried changing
RAYGUI_IMPLEMENTATION
toRAYGUI_STATIC
but that just makes makes the functions invisible to the compilerI'm not sure if this is related, but I'm also getting a bunch of warnings about enum mismatches:
They seem to come from different places in
raygui.h
from these calls, which return values from two different enums depending on the result:That should probably go on its own issue, but I saying it here just in case is somehow related to my problem