-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
TextToFloat
was not declared in this scope when compiling a raygui program
#407
Comments
The following function can be moved from // in raygui.h
static float TextToFloat(const char *text)
// in raylib.h
RLAPI const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
RLAPI int TextToInteger(const char *text); // Get integer value from text (negative values not supported)
.
. |
i had this same issue, and it's caused by a mismatch in the version of raygui and raylib. basically, if you're using the 5.0.1 version of raylib (which is what you'd get from either the releases page or from a package manager), and then try to use the most recent raygui from this repo, you'll get errors since raygui ends up relying on raylib features that aren't yet in the newest released version (like texttofloat). to fix this you can either build raylib from source as described in the raylib wiki, and continue to use the newest possible raygui, or you can use the 5.0.1 version of raylib with something like the 4.0 release of raygui. |
Thank you. I did try to build raylib from source and then use the latest version of raygui with it. But the personally built version also didn't work with raygui for me and it kept giving me the same error. In the end I just ditched raygui and ended up going with raylib only for my semester project |
I had the same issue, but I just put the function from static float TextToFloat(const char *text)
{
...
} before this function, which is the one screaming int GuiValueBoxFloat() And now I can compile without any errors. I'm using |
so last raylib and last raygui isnt working.... |
Can confirm, works like a charm! Raylib from pkgmanager, versions of raygui and raylib are the same as yours. Thank you :) |
its working with vcpkg. |
Whenever i compile the example given in raygui Readme or any other source file that uses raygui. It errors out on following:
At first i thought, i was using incompatible versions with raylib or something. I changed those but it didn't help. I tried with cmake toolchain, installing the packages with
![image](https://private-user-images.githubusercontent.com/72691864/334572234-9ca38a5c-b6d6-4658-b316-796a4c2b5aad.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODk3MTcsIm5iZiI6MTcyMDM4OTQxNywicGF0aCI6Ii83MjY5MTg2NC8zMzQ1NzIyMzQtOWNhMzhhNWMtYjZkNi00NjU4LWIzMTYtNzk2YTRjMmI1YWFkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDIxNTY1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkYjM1Y2U1YjgyMDIyMThhODFlYTVkMjE1YmVjMzVhZmJiNzAyNWNiMDU0MTVjZTdkN2U4ZTk0NmYzYTJlMTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.an8fKCa9E1dGc_-tp2M0HYp1YZa6gFJqMMZisdnfrl0)
vcpkg
. But the same error persists. Raylib works perfectly fine for me. The problem only occurs when i try to includeraygui
.Here's the Screenshot:
I am on WIndows 11 with w64devkit and gcc V 13.2.0
The text was updated successfully, but these errors were encountered: