From d18d25e3074cf04cc385f34fd4fed33240fe3c2e Mon Sep 17 00:00:00 2001 From: jvallve <jvallve@iri.upc.edu> Date: Thu, 12 May 2022 18:04:59 +0200 Subject: [PATCH] strange linking bug fixed --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50b8e9a..2a1f3b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.10) project(wolf_ros_laser) ## Compile as C++14 -add_compile_options(-std=c++14) +add_compile_options(-std=c++14) +# -fPIC and -rdynamic ensure unique singleton instance across shared libraries (for factories) see: https://stackoverflow.com/a/8626922 +SET(CMAKE_CXX_FLAGS "-fPIC -rdynamic") find_package(catkin REQUIRED COMPONENTS roscpp @@ -16,9 +18,6 @@ find_package(catkin REQUIRED COMPONENTS ) ## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) -# find_package(Ceres REQUIRED) -# find_package(Eigen3 REQUIRED) find_package(wolfcore REQUIRED) find_package(wolflaser REQUIRED) find_package(falkolib QUIET) -- GitLab