最近在找OpenCV库中“calcOpticalFlowPyrLK”函数的源码。当我搜索它的定义时,我发现了一个名为“CV_EXPORTS_W”的宏。有人知道是什么意思吗?

最佳答案

CV_EXPORTS_W is defined in modules/core/include/opencv2/core/types_c.h 作为 CV_EXPORTS 的别名,在同一个文件 CV_EXPORTS is defined as 中:

#if (defined WIN32 || defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS
# define CV_EXPORTS __declspec(dllexport)
#else
# define CV_EXPORTS
#endif

也就是说,在定义了__declspec(dllexport)的windows平台上,它是 CVAPI_EXPORTS 的别名,否则为空。

10-08 08:22
查看更多