Q:facebook folly::future,compile failed

125 Views Asked by At

I just write like this:

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

However,fail,giving this message:

  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_'
  ..............

My CMakeLists:

  project(FollyTest)
  cmake_minimum_required(VERSION 2.8)

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

How can I fix this issue?

0

There are 0 best solutions below