Relative Content

Tag Archive for static-linking

C++ name mangling and linker symbol resolution

The name mangling schemes of C++ compilers vary, but they are documented publicly. Why aren’t linkers made to decode a mangled symbol from an object file and attempt to find a mangled version via any of the mangling conventions across the other object files/static libraries? If linkers could do this, wouldn’t it help alleviate the problem with C++ libraries that they have to be re-compiled by each compiler to have symbols that can be resolved?

Why are there two different kinds of linking, i.e. static and dynamic?

I’ve been bitten for the n-th time now by a library mismatch between a build and deployment environment. The build environment had libruby.so.2.0 and the deployment environment had libruby.a. One ruby was built with RVM, the other was built with ruby-build. The reason I ran into a problem was because zookeeper was compiled in a build environment that had the shared library but the deployment environment only had the static library.

Why are there two different kinds of linking, i.e. static and dynamic?

I’ve been bitten for the n-th time now by a library mismatch between a build and deployment environment. The build environment had libruby.so.2.0 and the deployment environment had libruby.a. One ruby was built with RVM, the other was built with ruby-build. The reason I ran into a problem was because zookeeper was compiled in a build environment that had the shared library but the deployment environment only had the static library.