From 55ff68bff7238914cfb66d7a023f3b69a8e54fc8 Mon Sep 17 00:00:00 2001 From: jerryzeng Date: Sun, 14 Sep 2025 23:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=84=8A=E6=8E=A5Arm=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 ++ sourceCode/SX_lapWeldDetection_Export.h | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a83194..5ad4112 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,8 @@ ADD_LIBRARY(baseAlgorithm SHARED sourceCode/SG_baseFunc.cpp ADD_LIBRARY(bagPositioning SHARED sourceCode/SG_bagPositioning.cpp) +ADD_LIBRARY(lapWeldDetection SHARED sourceCode/SX_lapWeldDetection.cpp) + #add executable file # ADD_EXECUTABLE(bagPositioning_test bagPositioning_test/bagPositioning_test.cpp) diff --git a/sourceCode/SX_lapWeldDetection_Export.h b/sourceCode/SX_lapWeldDetection_Export.h index 7c60495..e7c372f 100644 --- a/sourceCode/SX_lapWeldDetection_Export.h +++ b/sourceCode/SX_lapWeldDetection_Export.h @@ -1,11 +1,20 @@ #pragma once -#if defined(SG_API_LIBRARY) -# define SG_APISHARED_EXPORT __declspec(dllexport) +#if defined(_MSC_VER) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) +# define Q_DECL_EXPORT __declspec(dllexport) +# define Q_DECL_IMPORT __declspec(dllimport) #else -# define SG_APISHARED_EXPORT __declspec(dllimport) +# define Q_DECL_EXPORT __attribute__((visibility("default"))) +# define Q_DECL_IMPORT __attribute__((visibility("default"))) #endif +#if defined(SG_API_LIBRARY) +# define SG_WELDSHARED_EXPORT Q_DECL_EXPORT +#else +# define SG_WELDSHARED_EXPORT Q_DECL_IMPORT +#endif + + #include "SG_baseDataType.h" #include #include @@ -20,17 +29,17 @@ typedef struct //计算一个平面调平参数。 //数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平 //旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数 -SG_APISHARED_EXPORT SSG_planeCalibPara sx_getBaseCalibPara( +SG_WELDSHARED_EXPORT SSG_planeCalibPara sx_getBaseCalibPara( std::vector< std::vector>& scanLines); //相机姿态调平,并去除地面 -SG_APISHARED_EXPORT void sx_lineDataR( +SG_WELDSHARED_EXPORT void sx_lineDataR( std::vector< SVzNL3DPosition>& a_line, const double* camPoseR, double groundH); //提取搭接焊缝 -SG_APISHARED_EXPORT void sx_getLapWeldPostion( +SG_WELDSHARED_EXPORT void sx_getLapWeldPostion( std::vector< std::vector>& scanLines, const SSG_cornerParam cornerPara, SSG_treeGrowParam growParam,