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

[C API] Fixed build issues #367

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jack121298
Copy link

Fixed build issues after gcc 14.1 changes and also forced C++ 17 as required by flatbuffers

Copy link
Collaborator

@lakulish lakulish left a comment

Choose a reason for hiding this comment

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

The change to CMAKE_CXX_FLAGS needs to occur for Linux only. Windows builds will fail otherwise.

"-DFLATBUFFERS_BUILD_TESTS=FALSE"
"-DFLATBUFFERS_BUILD_TESTS=FALSE",
"-DCMAKE_CXX_STANDARD=17",
"-DCMAKE_CXX_FLAGS=-Wno-stringop-overflow"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This won't work on Windows, since Visual C++ doesn't recognize this flag. Instead, you'll have to specify platform-specific flags. The flatbuffers section of dependencies.json does something like that for osx. You'll have to create another such section with "platforms": ["linux-x86", "linux-x64"].

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