I tried to link against a swiftkey library and got this error:
g++ test.cpp -I include/swiftkeysdk/ -L lib/x86/ -lswiftkeysdk-cpp
/usr/bin/ld: warning: libm.so.2, needed by lib/x86//libswiftkeysdk-cpp.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcpp.so.4, needed by lib/x86//libswiftkeysdk-cpp.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libc.so.3, needed by lib/x86//libswiftkeysdk-cpp.so, not found (try using -rpath or -rpath-link)
$ ldconfig -p | grep "libm.so"
libm.so.6 (libc6, OS ABI: Linux 2.6.15) => /lib/i386-linux-gnu/libm.so.6
libm.so (libc6, OS ABI: Linux 2.6.15) => /usr/lib/i386-linux-gnu/libm.so
$ ldconfig -p | grep "libc.so"
libc.so.6 (libc6, OS ABI: Linux 2.6.15) => /lib/i386-linux-gnu/libc.so.6
But my g++ works fine with other projects. Anyone have any idea what the number behind .so stand for? And how to fix this problem?
The number behind
.sois the version number of the library. The version number defines the ABI of the library. That is, different versions of the source code might use the same so number, as long as their binary interface is interchangeable.For more information see https://unix.stackexchange.com/questions/475/how-do-so-shared-object-numbers-work
libc.so.3 is very unusable to see with Linux. Where did you get libswiftkeysdk-cpp.so from?