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

Enable MINGW C99 standard IO. #476

Closed
wants to merge 1 commit into from

Conversation

jvalenzuela
Copy link
Contributor

No description provided.

Resolves MinGW-w64 warnings related to unknown conversion type
characters in fscanf. See new code comment for additional details.
Copy link
Member

@MartinMelikMerkumians MartinMelikMerkumians left a comment

Choose a reason for hiding this comment

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

I think it would be better to move the compiler-specific define into CMake.
By using
IF(MINGW)
add_compile_definitions(__USE_MINGW_ANSI_STDIO=1)
END_IF()

This should be working for MinGW and adding the needed define to the whole project, in case someone else is using scanf somewhere else

@jvalenzuela
Copy link
Contributor Author

Upon further investigation it looks like using that macro might not be such a hot idea. I'll submit a different approach in a separate pull request.

@jvalenzuela jvalenzuela closed this Oct 9, 2023
@jvalenzuela jvalenzuela deleted the mingwC99 branch October 9, 2023 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants