修改导出符号

This commit is contained in:
jerryzeng 2025-06-29 11:40:32 +08:00
parent 8d34a53ace
commit 6b0e996181
4 changed files with 38 additions and 13 deletions

View File

@ -5,11 +5,14 @@
#include <vector>
#include <stdio.h>
#include <VZNL_Types.h>
#include "direct.h"
#include <string>
#include "SG_bagPositioning_Export.h"
#include <opencv2/opencv.hpp>
#ifdef _WIN32
#include <Windows.h>
#include "direct.h"
#endif
SVzNL3DPoint _ptRotate(SVzNL3DPoint pt3D, double matrix3d[9])
{

View File

@ -1,9 +1,17 @@
#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_BAGSHARED_EXPORT Q_DECL_EXPORT
#else
# define SG_BAGSHARED_EXPORT Q_DECL_IMPORT
#endif
#define OUTPUT_DEBUG 0
@ -34,11 +42,11 @@ typedef struct
double baseHoleDist; //托盘两个孔洞的距离
}SSG_stackBaseParam;
SG_APISHARED_EXPORT void sg_lineDataR(SVzNL3DLaserLine* a_line,
SG_BAGSHARED_EXPORT void sg_lineDataR(SVzNL3DLaserLine* a_line,
const double* camPoseR,
double groundH);
SG_APISHARED_EXPORT void sg_bagPositioning_lineProc(
SG_BAGSHARED_EXPORT void sg_bagPositioning_lineProc(
SVzNL3DLaserLine* a_line,
int lineIdx,
int* errCode,
@ -47,7 +55,7 @@ SG_APISHARED_EXPORT void sg_bagPositioning_lineProc(
const SG_bagPositionParam algoParam);
//获取编织袋中心抓取点姿态,从顶部抓取
SG_APISHARED_EXPORT void sg_getBagPosition(
SG_BAGSHARED_EXPORT void sg_getBagPosition(
SVzNL3DLaserLine* laser3DPoints,
int lineNum,
//std::vector<SSG_lineFeature>& all_vLineFeatures,
@ -56,13 +64,13 @@ SG_APISHARED_EXPORT void sg_getBagPosition(
const SSG_planeCalibPara poseCalibPara,
std::vector<SSG_peakRgnInfo>& objOps);
SG_APISHARED_EXPORT void sg_sideBagPosition(
SG_BAGSHARED_EXPORT void sg_sideBagPosition(
SVzNL3DLaserLine* laser3DPoints,
int lineNum,
const SG_bagPositionParam algoParam,
std::vector<SSG_sideBagInfo>& objOps);
SG_APISHARED_EXPORT void sg_getSideBagStackBasePosition(
SG_BAGSHARED_EXPORT void sg_getSideBagStackBasePosition(
SVzNL3DLaserLine* laser3DPoints,
int lineNum,
const SSG_stackBaseParam stackBaseParam,
@ -73,6 +81,6 @@ SG_APISHARED_EXPORT void sg_getSideBagStackBasePosition(
//计算一个平面调平参数。
//数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平
//旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数
SG_APISHARED_EXPORT SSG_planeCalibPara sg_getBagBaseCalibPara(
SG_BAGSHARED_EXPORT SSG_planeCalibPara sg_getBagBaseCalibPara(
SVzNL3DLaserLine* laser3DPoints,
int lineNum);

View File

@ -1,9 +1,18 @@
#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_ALGO_DECL_EXPORT __declspec(dllexport)
# define Q_ALGO_DECL_IMPORT __declspec(dllimport)
#else
# define SG_APISHARED_EXPORT __declspec(dllimport)
# define Q_ALGO_DECL_EXPORT __attribute__((visibility("default")))
# define Q_ALGO_DECL_IMPORT __attribute__((visibility("default")))
#endif
#if defined(SG_API_LIBRARY)
# define SG_APISHARED_EXPORT Q_ALGO_DECL_EXPORT
#else
# define SG_APISHARED_EXPORT Q_ALGO_DECL_IMPORT
#endif
#include "SG_baseDataType.h"

View File

@ -1,7 +1,12 @@
#include "SG_baseDataType.h"
#include "SG_baseAlgo_Export.h"
#include <vector>
#ifdef __WIN32
#include <corecrt_math_defines.h>
#else
#include <math.h>
#endif // __WIN32
#include <cmath>
SVzNL3DRangeD sg_getScanDataROI(