You can do this relatively painlessly if you use static binding. This means that the runtime libraries are tied to your executable when you compile / link (on your computer), rather than loading dynamically at runtime (on another computer).
If you use dynamic linking, libraries should be available at runtime in which you run the code, so the loader (part of the OS) can find them and link to them.
For a good explanation of the static / dynamic link differences see here .
source share