-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
C++ compiler support #5232
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
base: master
Are you sure you want to change the base?
C++ compiler support #5232
Conversation
I would appreciate it if somebody could review this and suggest how I can improve this. I dont think my solutions for aggregate initializers is good, but I am not sure how to improve it. |
@sakgoyal Thanks for the review, I see multiple improvements that can be implemented but I'm afraid external libraries should not be modified on raylib side because once updated to latest versions, changes will be lost. Still, some of the them are managed by me so only libraries managed by other developers will suffer that fate. I also see some specific changes that I don't understand why are required. Added some notes. Also, about coding conventions, raylib uses a space before asterix on casting, please, could you review that? (i.e. |
{ | ||
drwav wav = { 0 }; | ||
#ifdef __cplusplus | ||
drwav_data_format format = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this is required? I prefer to avoid it.
#endif | ||
struct HINSTANCE__; | ||
#if defined(__cplusplus) | ||
extern "C" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmh... why is this required? Because name mangling?
void *data = NULL; | ||
|
||
#ifdef __cplusplus | ||
cgltf_options options = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to avoid the __cplusplus check only for that.
I will revert GLFW and qoa. is my fix for RGFW seems to be introducing some breaking changes for v1.8 (removing gamepad support, and more). so that will require a rework of the RGFW backend in raylib. for now, I think backporting this change is useful for now while 1.8 is being worked on |
Allow C++ compilers to compile this code without separately linking as a C library.
Changes:
keyMappingRGFW