From 4863ef85045781d0d51caf13da89231510c25be9 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Wed, 1 Jan 2025 21:35:29 +0000 Subject: [PATCH 1/2] Remove unnecessary file --- .../kinematics_interface/visibility_control.h | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 kinematics_interface/include/kinematics_interface/visibility_control.h diff --git a/kinematics_interface/include/kinematics_interface/visibility_control.h b/kinematics_interface/include/kinematics_interface/visibility_control.h deleted file mode 100644 index 4b1b9b2..0000000 --- a/kinematics_interface/include/kinematics_interface/visibility_control.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2022, PickNik, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef KINEMATICS_INTERFACE__VISIBILITY_CONTROL_H_ -#define KINEMATICS_INTERFACE__VISIBILITY_CONTROL_H_ - -// This logic was borrowed (then namespaced) from the examples on the gcc wiki: -// https://gcc.gnu.org/wiki/Visibility - -#if defined _WIN32 || defined __CYGWIN__ -#ifdef __GNUC__ -#define IK_PLUGIN_BASE_EXPORT __attribute__((dllexport)) -#define IK_PLUGIN_BASE_IMPORT __attribute__((dllimport)) -#else -#define IK_PLUGIN_BASE_EXPORT __declspec(dllexport) -#define IK_PLUGIN_BASE_IMPORT __declspec(dllimport) -#endif -#ifdef IK_PLUGIN_BASE_BUILDING_DLL -#define IK_PLUGIN_BASE_PUBLIC IK_PLUGIN_BASE_EXPORT -#else -#define IK_PLUGIN_BASE_PUBLIC IK_PLUGIN_BASE_IMPORT -#endif -#define IK_PLUGIN_BASE_PUBLIC_TYPE IK_PLUGIN_BASE_PUBLIC -#define IK_PLUGIN_BASE_LOCAL -#else -#define IK_PLUGIN_BASE_EXPORT __attribute__((visibility("default"))) -#define IK_PLUGIN_BASE_IMPORT -#if __GNUC__ >= 4 -#define IK_PLUGIN_BASE_PUBLIC __attribute__((visibility("default"))) -#define IK_PLUGIN_BASE_LOCAL __attribute__((visibility("hidden"))) -#else -#define IK_PLUGIN_BASE_PUBLIC -#define IK_PLUGIN_BASE_LOCAL -#endif -#define IK_PLUGIN_BASE_PUBLIC_TYPE -#endif - -#endif // KINEMATICS_INTERFACE__VISIBILITY_CONTROL_H_ From 7e51b432a636050525783971d55e0bc306d6dd8f Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Wed, 1 Jan 2025 21:35:36 +0000 Subject: [PATCH 2/2] Export symbols on windows --- kinematics_interface/CMakeLists.txt | 4 ++++ kinematics_interface_kdl/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/kinematics_interface/CMakeLists.txt b/kinematics_interface/CMakeLists.txt index 88eaf9e..f0dbffd 100644 --- a/kinematics_interface/CMakeLists.txt +++ b/kinematics_interface/CMakeLists.txt @@ -5,6 +5,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") add_compile_options(-Wall -Wextra -Wpedantic) endif() +# using this instead of visibility macros +# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053 +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + set(THIS_PACKAGE_INCLUDE_DEPENDS rclcpp rclcpp_lifecycle diff --git a/kinematics_interface_kdl/CMakeLists.txt b/kinematics_interface_kdl/CMakeLists.txt index afeadae..c1cc640 100644 --- a/kinematics_interface_kdl/CMakeLists.txt +++ b/kinematics_interface_kdl/CMakeLists.txt @@ -5,6 +5,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") add_compile_options(-Wall -Wextra -Wpedantic) endif() +# using this instead of visibility macros +# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053 +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + set(THIS_PACKAGE_INCLUDE_DEPENDS kdl_parser kinematics_interface