Compile OpenCV with GCC visibility set to hidden

This commit is contained in:
Andrey Kamaev
2013-04-18 10:30:15 +04:00
committed by Andrey Pavlenko
parent 8130d92602
commit b8ed00bd64
16 changed files with 42 additions and 85 deletions

View File

@@ -73,8 +73,10 @@
# define CV_ENABLE_UNROLLED 1
#endif
#if (defined WIN32 || defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS
#if (defined WIN32 || 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

View File

@@ -174,7 +174,7 @@ public:
To make it all work, you need to specialize Ptr<>::delete_obj(), like:
\code
template<> void Ptr<MyObjectType>::delete_obj() { call_destructor_func(obj); }
template<> CV_EXPORTS void Ptr<MyObjectType>::delete_obj() { call_destructor_func(obj); }
\endcode
\note{if MyObjectType is a C++ class with a destructor, you do not need to specialize delete_obj(),

View File

@@ -272,7 +272,11 @@ CV_INLINE double cvRandReal( CvRNG* rng )
#define IPL_BORDER_REFLECT 2
#define IPL_BORDER_WRAP 3
typedef struct CV_EXPORTS _IplImage
typedef struct
#ifdef __cplusplus
CV_EXPORTS
#endif
_IplImage
{
int nSize; /* sizeof(IplImage) */
int ID; /* version (=0)*/
@@ -563,7 +567,11 @@ CV_INLINE int cvIplDepth( int type )
#define CV_MAX_DIM 32
#define CV_MAX_DIM_HEAP 1024
typedef struct CV_EXPORTS CvMatND
typedef struct
#ifdef __cplusplus
CV_EXPORTS
#endif
CvMatND
{
int type;
int dims;
@@ -610,7 +618,11 @@ CvMatND;
struct CvSet;
typedef struct CV_EXPORTS CvSparseMat
typedef struct
#ifdef __cplusplus
CV_EXPORTS
#endif
CvSparseMat
{
int type;
int dims;