我尝试编译Apache Ignite 2.0 C ++。我正在从目录/opt/apache-ignite-2.0.0-src/modules/platforms/cpp
运行make。我已经编译了所有Java代码,我可以启动Apache Ignite。但是,C ++不能编译。看来我必须通过C ++代码来解决问题。
运行make时出现的错误是:
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in common
Making all in include
make[3]: Nothing to be done for `all'.
Making all in os/linux/include
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in binary
Making all in include
make[3]: Nothing to be done for `all'.
CXX src/binary/binary_containers.lo
In file included from src/binary/binary_containers.cpp:18:
In file included from ./include/ignite/binary/binary_containers.h:30:
In file included from ./include/ignite/impl/binary/binary_writer_impl.h:35:
In file included from ./include/ignite/impl/binary/binary_object_impl.h:31:
./include/ignite/impl/binary/binary_reader_impl.h:986:58: error: variable has incomplete type 'ignite::binary::BinaryReader'
ignite::binary::BinaryReader reader(&readerImpl);
^
./include/ignite/binary/binary_type.h:135:15: note: forward declaration of 'ignite::binary::BinaryReader'
class BinaryReader;
^
In file included from src/binary/binary_containers.cpp:18:
In file included from ./include/ignite/binary/binary_containers.h:30:
./include/ignite/impl/binary/binary_writer_impl.h:702:54: error: variable has incomplete type 'ignite::binary::BinaryWriter'
ignite::binary::BinaryWriter writer(&writerImpl);
^
./include/ignite/binary/binary_type.h:134:15: note: forward declaration of 'ignite::binary::BinaryWriter'
class BinaryWriter;
^
2 errors generated.
make[3]: *** [src/binary/binary_containers.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
答案 0 :(得分:1)
这很可能是因为你使用clang ++来编译点燃。
解释原因本身 in a different SO question:Apache Ignite C ++代码错误(它有一个错误),但碰巧有些编译器没有检测到并报告问题。
一个解决方案(除了修改点燃源代码)将使用g ++。 OSX的说明是in a different SO question。