I am trying to use dlopen() and dlsym() in my code and compile it with gcc.
Here is the first file.
/* main.c
To keep the -pedantic option for your code while having parts of code that are not strictly conforming, separate that code into a separate file with custom warning options.
So, make a function that wraps the dlsym function and returns a function pointer. Put it in a separate file and compile that file without -pedantic.