提交 bbf3607f 编写于 作者: V Vadim Pisarevsky

Merge pull request #3652 from alalek:ocl_message

...@@ -70,7 +70,8 @@ static void* AppleCLGetProcAddress(const char* name) ...@@ -70,7 +70,8 @@ static void* AppleCLGetProcAddress(const char* name)
handle = dlopen(oclpath, RTLD_LAZY | RTLD_GLOBAL); handle = dlopen(oclpath, RTLD_LAZY | RTLD_GLOBAL);
if (handle == NULL) if (handle == NULL)
{ {
fprintf(stderr, ERROR_MSG_CANT_LOAD); if (envPath)
fprintf(stderr, ERROR_MSG_CANT_LOAD);
} }
else if (dlsym(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL) else if (dlsym(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
{ {
...@@ -108,7 +109,8 @@ static void* WinGetProcAddress(const char* name) ...@@ -108,7 +109,8 @@ static void* WinGetProcAddress(const char* name)
handle = LoadLibraryA(path); handle = LoadLibraryA(path);
if (!handle) if (!handle)
{ {
fprintf(stderr, ERROR_MSG_CANT_LOAD); if (envPath)
fprintf(stderr, ERROR_MSG_CANT_LOAD);
} }
else if (GetProcAddress(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL) else if (GetProcAddress(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
{ {
...@@ -145,7 +147,8 @@ static void* GetProcAddress(const char* name) ...@@ -145,7 +147,8 @@ static void* GetProcAddress(const char* name)
handle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL); handle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL);
if (handle == NULL) if (handle == NULL)
{ {
fprintf(stderr, ERROR_MSG_CANT_LOAD); if (envPath)
fprintf(stderr, ERROR_MSG_CANT_LOAD);
} }
else if (dlsym(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL) else if (dlsym(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册