Hi there everyone!
I have a problem. I have an application and a shared object. Now I know applications normally call functions in shared objects, but I’m doing the opposite - the shared object needs to call a function in the main program.
I must first stress that this works perfectly on FreeBSD with clang and also on Linux with gcc.
So the problem comes when I take the seemingly innocuous step of moving the called function into a static library created with the ar utility. Suddenly the shared object cannot find the function in the main program. I’ve not found this exact problem on stackoverflow but I tried a bunch of other stuff from there (—whole-archive and -fvisibility=default in particular) with no success.
Can anyone help?
I have a problem. I have an application and a shared object. Now I know applications normally call functions in shared objects, but I’m doing the opposite - the shared object needs to call a function in the main program.
I must first stress that this works perfectly on FreeBSD with clang and also on Linux with gcc.
So the problem comes when I take the seemingly innocuous step of moving the called function into a static library created with the ar utility. Suddenly the shared object cannot find the function in the main program. I’ve not found this exact problem on stackoverflow but I tried a bunch of other stuff from there (—whole-archive and -fvisibility=default in particular) with no success.
Can anyone help?