opencvCV

    xiaoxiao2022-07-05  150

    opencv2/core/cvdef.h中定义 

    #if (defined _WIN32 || defined WINCE || defined __CYGWIN__) && defined CVAPI_EXPORTS # define CV_EXPORTS __declspec(dllexport) #elif defined __GNUC__ && __GNUC__ >= 4 # define CV_EXPORTS __attribute__ ((visibility ("default"))) #else # define CV_EXPORTS #endif

    也就是说,CV_EXPORTS 实际上就是 __declspec(dllexport),其作用如下:

    使用 __declspec(dllexport) 关键字从 DLL 导出数据、函数、类或类成员函数。

     __declspec(dllexport) 会将导出指令添加到对象文件中,因此在指定的对象文件里不需要使用 .def 文件。  

    最新回复(0)