On Wed March 7 2012 09:41:23 Timothy Pearson wrote:
Let's take a simple example, qWarning. This
becomes _Z8qWarningPKcz in
libqt-mt.so.3.3.8 (nm -D /usr/lib/libqt-mt.so | grep qWarning), and
_Z8qWarningPKcz in /usr/lib/libQtCore.so (nm -D /usr/lib/libQtCore.so |
grep qWarning). If my program references Z8qWarningPKcz, which library
will the symbol resolver choose at runtime? They are not binary
compatible with each other, and when the symbol resolver chooses the wrong
one at runtime (which it will do quite often) the entire program will
crash.
Could the problem you describe be addressed more easily with C++ namespaces?
--Mike Bird