Skip to content

Comments

[C API] Fixed build issues#367

Open
Jack121298 wants to merge 2 commits intoValveSoftware:masterfrom
Jack121298:master
Open

[C API] Fixed build issues#367
Jack121298 wants to merge 2 commits intoValveSoftware:masterfrom
Jack121298:master

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