Я столкнулся с этой ошибкой после cmake, а затем сделать. Я установил все зависимости как конфигурация .. спасибо
ME664JA-no-MacBook-Pro:examples ME664JA$ make
[ 0%] Built target all_examples
[ 1%] Building CXX object CMakeFiles/curl_fuse.dir/curl/curl_fuse.cpp.o
In file included from /Users/ME664JA/Projects/actor-framework/examples/curl/curl_fuse.cpp:45:
In file included from /usr/local/include/caf/all.hpp:25:
In file included from /usr/local/include/caf/sec.hpp:27:
In file included from /usr/local/include/caf/error.hpp:27:
/usr/local/include/caf/fwd.hpp:111:12: error: ISO C++ forbids forward references to 'enum' types
enum class atom_value : uint64_t;
^
/usr/local/include/caf/fwd.hpp:111:23: error: expected unqualified-id
enum class atom_value : uint64_t;
^
In file included from /Users/ME664JA/Projects/actor-framework/examples/curl/curl_fuse.cpp:45:
In file included from /usr/local/include/caf/all.hpp:25:
In file included from /usr/local/include/caf/sec.hpp:27:
In file included from /usr/local/include/caf/error.hpp:28:
In file included from /us`enter code here`r/local/include/caf/atom.hpp:27:
/usr/local/include/caf/detail/atom_val.hpp:29:1: error: unknown type name 'constexpr'
constexpr unsigned char encoding_table[] = {
^
/usr/local/include/caf/detail/atom_val.hpp:29:11: error: expected unqualified-id
constexpr unsigned char encoding_table[] = {
C ++ Actor Framework написана на C ++ 11, добавьте одну из этих строк в ваш CMakeLists.txt
:
set (CMAKE_CXX_STANDARD 14)
или же
set (CMAKE_CXX_STANDARD 11)
этот пример работает для меня
project(projectCAF)
cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 11)
set(CAF_INCLUDE_ALL /usr/local/include/caf)
include_directories(${CAF_INCLUDE_ALL})
link_directories(/usr/local/lib)macro(add executable folder source)
add_executable(${executable} ${folder}/${source}.cpp )
target_link_libraries(${executable} "libcaf_core.so")
endmacro()
add(one . hello)