I\'m trying to compile the following simple DL library example code from Program-Library-HOWTO with g++. This is just an example so I can learn how to use and write shared libr
In C++, you have to perform a reinterpret_cast (not a C cast):
reinterpret_cast
typedef double (* double_from_double_function_t(double)); … double_from_double_function_t cosine = reinterpret_cast(dlsym(handle, "cos"));