Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linker error and lower Boost version in Follow Me example #256

Merged
merged 1 commit into from
Feb 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion example/follow_me/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -23,5 +23,6 @@ target_link_libraries(follow_me
dronecore
dronecore_action
dronecore_follow_me
dronecore_telemetry
pthread
)
2 changes: 1 addition & 1 deletion example/follow_me/fake_location_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FakeLocationProvider
public:
typedef std::function<void(double lat, double lon)> location_callback_t;

FakeLocationProvider(boost::asio::io_context &io)
FakeLocationProvider(boost::asio::io_service &io)
: timer_(io, boost::posix_time::seconds(1))
{}

Expand Down
2 changes: 1 addition & 1 deletion example/follow_me/follow_me.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<FakeLocationProvider> 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) {
Expand Down