Sorry, but what you want to do is not possible. The linker wants to see the shared library so it knows which symbols are defined there and which are not; it needs to know that to understand how the linkage will work. You'll have to copy the target's shared library to your development system, or else use explicit loading as suggested in the answer you reference (dlopen etc.) and create the linkage yourself with dlsym(). – MadScientist
You can transfer the file from host to build. If you cann't do this, then there is no way for the linker to know which library an un-resolved symbol exists in. You can create a fake host library with shims for implementation. This will work even if you can not transfer the host library (host locked down or something). This will allow you to link on the build machine and it should patch to the full implementation on the host by its loader. – artless noise