目录
方法1:API.h 声明
API.h:代码
#ifdef API_EXPORTS
#if defined(_MSC_VER)
#define API __declspec(dllexport)
#else
#define API __attribute__((visibility("default")))
#endif
#else
#if defined(_MSC_VER)
#define API __declspec(dllimport)
#else
#define API
#endif
#endif
类设置:
class API Detector
{
public:
explicit Detector();
~Detector();
void init(const Config &config);
void detect(const std::vector<cv::Mat> &mat_image, std::vector<BatchResult> &vec_batch_result);
private:
Detector(const Detector &);
const Detector &operator =