From 7d6c67c77ae33f6c4cfe6b419514f554a18b3a8a Mon Sep 17 00:00:00 2001 From: Shakthi Prashanth M Date: Thu, 8 Feb 2018 17:35:37 +0530 Subject: [PATCH] Fix linker error and lower Boost version in Follow Me example 1. Fix linker error occured during flexible plugin arch changes. 2. Lower Boost dependency version from `1.66` to `1.58` to match that of Ubuntu 16. --- example/follow_me/CMakeLists.txt | 3 ++- example/follow_me/fake_location_provider.h | 2 +- example/follow_me/follow_me.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example/follow_me/CMakeLists.txt b/example/follow_me/CMakeLists.txt index f87d14e404..b407ddc9e5 100644 --- a/example/follow_me/CMakeLists.txt +++ b/example/follow_me/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.12) project(follow_me) -find_package(Boost 1.66 COMPONENTS REQUIRED system) +find_package(Boost 1.58 COMPONENTS REQUIRED system) include_directories(${Boost_INCLUDE_DIR}) if(NOT MSVC) @@ -23,5 +23,6 @@ target_link_libraries(follow_me dronecore dronecore_action dronecore_follow_me + dronecore_telemetry pthread ) diff --git a/example/follow_me/fake_location_provider.h b/example/follow_me/fake_location_provider.h index 8d17b749d1..d9374b0e7f 100644 --- a/example/follow_me/fake_location_provider.h +++ b/example/follow_me/fake_location_provider.h @@ -23,7 +23,7 @@ class FakeLocationProvider public: typedef std::function location_callback_t; - FakeLocationProvider(boost::asio::io_context &io) + FakeLocationProvider(boost::asio::io_service &io) : timer_(io, boost::posix_time::seconds(1)) {} diff --git a/example/follow_me/follow_me.cpp b/example/follow_me/follow_me.cpp index 9ad1f06feb..15e75cd3b9 100644 --- a/example/follow_me/follow_me.cpp +++ b/example/follow_me/follow_me.cpp @@ -90,7 +90,7 @@ int main(int, char **) follow_me_result = follow_me->start(); follow_me_error_exit(follow_me_result, "Failed to start FollowMe mode"); - boost::asio::io_context io; // for event loop + boost::asio::io_service io; // for event loop std::unique_ptr location_provider(new FakeLocationProvider(io)); // Register for platform-specific Location provider. We're using FakeLocationProvider for the example. location_provider->request_location_updates([&device, &follow_me](double lat, double lon) {