我正在使用以下命令创建.so文件:
用于创建.o文件
g++ -c -fPIC -I/usr/include/python2.7 -I/home/user/Desktop/AutoTest/SDKTestSuite/ -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. SDKTestSuite.cpp
用于创建.so文件
g++ -shared -o SDKTestSuite.so SDKTestSuite.o -L/usr/lib/i386-linux-gnu -lpython2.7 -lDijSDK -leventflag -lQtGui -lQtCore -L/usr/lib/i386-linux-gnu/cameras/ -lsynthcam -luusb
在创建.so文件后,如果我使用ldd命令显示.so文件的依赖项,则提供以下输出
user@emb-ubu-085:~/Desktop/AutoTest/SDKTestSuite$ ldd SDKTestSuite.so
linux-gate.so.1 => (0xb7792000)
libpython2.7.so.1.0 => /usr/lib/i386-linux-gnu/libpython2.7.so.1.0 (0xb746c000)
libDijSDK.so.1 => /home/user/Desktop/AutoTest/SDKTestSuite/libDijSDK.so.1 (0xb6f72000)
libeventflag.so => /home/user/Desktop/AutoTest/SDKTestSuite/libeventflag.so (0xb6f6e000)
libQtGui.so.4 => /usr/lib/i386-linux-gnu/libQtGui.so.4 (0xb649d000)
libQtCore.so.4 => /usr/lib/i386-linux-gnu/libQtCore.so.4 (0xb61b5000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb60cc000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb60af000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb5efb000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb5ee2000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb5ec7000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb5ec2000)
libutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xb5ebe000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb5e7a000)
libgomp.so.1 => /usr/lib/i386-linux-gnu/libgomp.so.1 (0xb5e69000)
libfontconfig.so.1 => /usr/lib/i386-linux-gnu/libfontconfig.so.1 (0xb5e30000)
libaudio.so.2 => /usr/lib/i386-linux-gnu/libaudio.so.2 (0xb5e17000)
libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb5d16000)
libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb5cec000)
libfreetype.so.6 => /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xb5c51000)
libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb5c01000)
libSM.so.6 => /usr/lib/i386-linux-gnu/libSM.so.6 (0xb5bf8000)
libICE.so.6 => /usr/lib/i386-linux-gnu/libICE.so.6 (0xb5bde000)
libXi.so.6 => /usr/lib/i386-linux-gnu/libXi.so.6 (0xb5bcd000)
libXrender.so.1 => /usr/lib/i386-linux-gnu/libXrender.so.1 (0xb5bc3000)
libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb5bb1000)
libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb5a7a000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb5a71000)
/lib/ld-linux.so.2 (0xb7793000)
libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb5a48000)
libXt.so.6 => /usr/lib/i386-linux-gnu/libXt.so.6 (0xb59ec000)
libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb59e8000)
libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb59a7000)
libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb59a0000)
libuuid.so.1 => /lib/i386-linux-gnu/libuuid.so.1 (0xb5999000)
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb5977000)
libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb5970000)
问题是,我在创建SDKTestSuite.so文件时包含库文件libsynthcam.so和libuusb.so文件。为什么这些摄像机名称没有显示在ldd命令的输出中。
如何使ldd命令显示这些库文件?