Peter Urbanec winehq.org@urbanec.net writes:
+static BOOL load_funcs(void *handle) +{ +#define LOAD_FUNCPTR(f) if((p##f = (void*)wine_dlsym(handle, #f, NULL, 0)) == NULL) \
- { ERR("Can not find " #f "\n"); return FALSE; } else { TRACE("Loaded function " #f "\n"); };
- /* Platform API */
- LOAD_FUNCPTR(clGetPlatformIDs)
- LOAD_FUNCPTR(clGetPlatformInfo)
- /* Device APIs */
- LOAD_FUNCPTR(clGetDeviceIDs)
- LOAD_FUNCPTR(clGetDeviceInfo)
Why are you loading everything dynamically instead of simply linking to it?