1

我只是这样写:

  #include <folly/futures/Future.h>
  using folly::Promise;
  int main()
  {
    Promise<int> p;
    return 0;
  }

但是,失败,给出这个消息:

  In function `folly::exception_wrapper::exception_wrapper()':
  error: undefined reference to `folly::exception_wrapper::uninit_'
  In function `folly::exception_wrapper::operator bool() const':
  undefined reference to `folly::exception_wrapper::uninit_'
  ..............

我的 CMakeLists:

  project(FollyTest)
  cmake_minimum_required(VERSION 2.8)

  aux_source_directory(. SRC_LIST)
  add_executable(${PROJECT_NAME} ${SRC_LIST})

我该如何解决这个问题?

4

0 回答 0