Q:facebook folly :: future,编译失败

时间:2018-08-16 14:54:09

标签: c++ cmake folly

我只是这样写:

  #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})

如何解决此问题?

0 个答案:

没有答案