FlatBuffers: Building
The distribution comes with a cmake file that should allow you to build project/make files for any platform. For details on cmake, see https://www.cmake.org. In brief, depending on your platform, use one of e.g.: Then, build as normal for your platform. This should result in a flatc executable, essential for the next steps. Note that to use clang instead of gcc, you may need to set up your environment variables, e.g. CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -G "Unix Makefiles". Optionally, run the flattests executable from the root flatbuffers/ directory to ensure everything is working correctly on your system. If this fails, please contact us! Building should also produce two sample executables, flatsamplebinary and flatsampletext, see the corresponding .cpp files in the flatbuffers/samples directory. Note that you MUST be in the root of the FlatBuffers distribution when you run 'flattests' or flatsampletext, or it will fail to load its files. By default all Flatbuffers cmake targ
Explore this link on the map →