diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 474eab7ed3..a2a2b8eb13 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -748,7 +748,7 @@ cvGetModuleInfo( const char* name, const char **version, const char **plugin_lis *plugin_list = plugin_list_buf; } -#if defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE +#if defined OPENCV_BUILD_SHARED_LIB && defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID ) { if( fdwReason == DLL_THREAD_DETACH || fdwReason == DLL_PROCESS_DETACH )