Skip to content
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

Add example program #215

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Add example program #215

merged 2 commits into from
Dec 20, 2023

Conversation

ChrisThrasher
Copy link
Member

Closes #211

I had to fix some function prototypes that were using () instead of (void) to list their parameters. The latter is required when compiling these headers as C code instead of C++ code. This example program is the first time internally to CSFML that CSFML headers were compiled as C code instead of C++, thus uncovering this problem.

@ChrisThrasher ChrisThrasher force-pushed the examples branch 4 times, most recently from e193712 to 28b69bc Compare December 20, 2023 04:58
Copy link
Contributor

@kimci86 kimci86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also cleanup resources when loading fails?

examples/example.c Outdated Show resolved Hide resolved
examples/example.c Outdated Show resolved Hide resolved
examples/example.c Outdated Show resolved Hide resolved
examples/example.c Outdated Show resolved Hide resolved
@eXpl0it3r
Copy link
Member

Do you want to enable it in CI or are you gonna do that with the other PR?

@ChrisThrasher ChrisThrasher force-pushed the examples branch 3 times, most recently from bcd9469 to 24dac0e Compare December 20, 2023 17:59
@ChrisThrasher
Copy link
Member Author

Do you want to enable it in CI or are you gonna do that with the other PR?

My bad that's fixed now

This is required when compiling these headers as C code. These were
omitted becuase before the addition of examples these headers were
only compiled locally as C++ files where adding the void keyword is
not needed.
examples/example.c Outdated Show resolved Hide resolved
@ChrisThrasher ChrisThrasher merged commit bf29112 into master Dec 20, 2023
14 checks passed
@ChrisThrasher ChrisThrasher deleted the examples branch December 20, 2023 21:33
@ChrisThrasher ChrisThrasher mentioned this pull request Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add example programs
3 participants