flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Problem compiling - Ubuntu 18.04 CMAKE version 3.10.2 make version 4.1

Open Chick92 opened this issue 3 years ago • 2 comments

Issue trying to compile flat buffers - Ubuntu 18.04 CMAKE version 3.10.2 make version 4.1

git clone https://github.com/google/flatbuffers.git cd flatbuffers/ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release make

CMakeFiles/flatc.dir/src/flatc.cpp.o: In function flatbuffers::FlatCompiler::AnnotateBinaries(unsigned char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)': flatc.cpp:(.text+0xf96): undefined reference to flatbuffers::BinaryAnnotator::Annotate()' flatc.cpp:(.text+0x11f2): undefined reference to `flatbuffers::AnnotatedBinaryTextGenerator::Generate(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' collect2: error: ld returned 1 exit status CMakeFiles/flatc.dir/build.make:848: recipe for target 'flatc' failed make[2]: *** [flatc] Error 1 CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/flatc.dir/all' failed make[1]: *** [CMakeFiles/flatc.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

Any ideas? Thanks in advance!

Chick92 avatar May 10 '22 15:05 Chick92

Are you trying to do anything illegal?

ghost avatar May 13 '22 06:05 ghost

This is because you are using a non-supported cmake version, see https://github.com/google/flatbuffers/blob/master/CMakeLists.txt#L4-L16

dbaileychess avatar Jun 14 '22 22:06 dbaileychess