ALL,
我试图看看我遇到了什么问题。我正在使用Anjuta + gcc-5.3在C ++ 11下编译我的程序和Gentoo Linux下的库。
编译和链接成功完成。但是在跑步时,我收到了主题中的错误。
我最好的猜测是,我在链接时遗漏了一些依赖。或者我需要链接libA,libB,但是链接libB,libA - 遗憾的是我对Linux构建系统不是很熟悉,我依靠Anjuta IDE来做正确的事情,而Anjuta仍然希望手动执行某些操作。
有没有办法检查?
谢谢。
[编辑]
我尝试重新构建并重新安装。这是输出:
这是来自构建目录:
igor@IgorDellGentoo ~/dbhandler/Debug/libdialogs/.libs $ pwd
/home/igor/dbhandler/Debug/libdialogs/.libs
igor@IgorDellGentoo ~/dbhandler/Debug/libdialogs/.libs $ ldd libdialogs.so.0
linux-vdso.so.1 (0x00007ffc9cf32000)
libsqlite_lib.so.0 => /home/igor/dbhandler/Debug/libsqlite/.libs/libsqlite_lib.so.0 (0x00007fa53c52d000)
libfieldswindow.so.0 => /home/igor/dbhandler/Debug/libfieldswindow/.libs/libfieldswindow.so.0 (0x00007fa53c316000)
libshapeframework.so.0 => /home/igor/dbhandler/Debug/libshapeframework/.libs/libshapeframework.so.0 (0x00007fa53bfee000)
libwx_gtk2u_xrc-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_xrc-3.1.so.0 (0x00007fa53bce4000)
libwx_gtk2u_html-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_html-3.1.so.0 (0x00007fa53b9f4000)
libwx_gtk2u_qa-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_qa-3.1.so.0 (0x00007fa53b7c6000)
libwx_gtk2u_adv-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_adv-3.1.so.0 (0x00007fa53b39b000)
libwx_gtk2u_core-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_core-3.1.so.0 (0x00007fa53ab38000)
libwx_baseu_xml-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_baseu_xml-3.1.so.0 (0x00007fa53a923000)
libwx_baseu_net-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_baseu_net-3.1.so.0 (0x00007fa53a6dc000)
libwx_baseu-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_baseu-3.1.so.0 (0x00007fa53a281000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6 (0x00007fa539e5e000)
libm.so.6 => /lib64/libm.so.6 (0x00007fa539b5d000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa5397c5000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1 (0x00007fa5395ae000)
libgtk-x11-2.0.so.0 => /usr/lib64/libgtk-x11-2.0.so.0 (0x00007fa538f67000)
libgdk-x11-2.0.so.0 => /usr/lib64/libgdk-x11-2.0.so.0 (0x00007fa538cb1000)
libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0 (0x00007fa538aa4000)
libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0 (0x00007fa53887d000)
libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007fa53855b000)
libgdk_pixbuf-2.0.so.0 => /usr/lib64/libgdk_pixbuf-2.0.so.0 (0x00007fa538338000)
libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007fa537fb6000)
libpangoft2-1.0.so.0 => /usr/lib64/libpangoft2-1.0.so.0 (0x00007fa537da0000)
libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007fa537b54000)
libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007fa5378ff000)
libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fa5376c2000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fa53741b000)
libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007fa537218000)
libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fa536ede000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fa536b9f000)
libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007fa536998000)
libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007fa536790000)
libnotify.so.4 => /usr/lib64/libnotify.so.4 (0x00007fa536588000)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fa536352000)
libz.so.1 => /lib64/libz.so.1 (0x00007fa53613c000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007fa535ee4000)
libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007fa535c6f000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fa535a6b000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa535850000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007fa535625000)
/lib64/ld-linux-x86-64.so.2 (0x00005624e7aa5000)
libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007fa535420000)
libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007fa53521a000)
libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007fa53500f000)
libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007fa534e0c000)
libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007fa534bfc000)
libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007fa5349f0000)
libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007fa5347e5000)
libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007fa5345e2000)
libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007fa5343de000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fa5341cc000)
libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007fa533f21000)
libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007fa533cfe000)
libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007fa533afa000)
libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007fa5338ef000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fa5336cc000)
libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007fa533434000)
librt.so.1 => /lib64/librt.so.1 (0x00007fa53322c000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa533015000)
libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007fa532daf000)
libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007fa532ba7000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fa532996000)
libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007fa53277a000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fa532575000)
libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007fa532372000)
libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0 (0x00007fa53216d000)
libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 (0x00007fa531f65000)
libxcb-shape.so.0 => /usr/lib64/libxcb-shape.so.0 (0x00007fa531d60000)
libgbm.so.1 => /usr/lib64/libgbm.so.1 (0x00007fa531b54000)
libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007fa531945000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fa531740000)
libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007fa53153a000)
libglapi.so.0 => /usr/lib64/libglapi.so.0 (0x00007fa53130c000)
libxcb-glx.so.0 => /usr/lib64/libxcb-glx.so.0 (0x00007fa5310f1000)
libxcb-dri3.so.0 => /usr/lib64/libxcb-dri3.so.0 (0x00007fa530eee000)
libxcb-present.so.0 => /usr/lib64/libxcb-present.so.0 (0x00007fa530ceb000)
libxcb-randr.so.0 => /usr/lib64/libxcb-randr.so.0 (0x00007fa530adc000)
libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1 (0x00007fa5308d5000)
libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1 (0x00007fa5306d2000)
libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007fa5304a4000)
这是来自安装目录:
IgorDellGentoo lib # pwd
/usr/local/lib
IgorDellGentoo lib # ldd libdialogs.so.0
linux-vdso.so.1 (0x00007ffd9375d000)
libsqlite_lib.so.0 => /usr/local/lib/libsqlite_lib.so.0 (0x00007f8802369000)
libfieldswindow.so.0 => not found
libshapeframework.so.0 => /usr/local/lib/libshapeframework.so.0 (0x00007f8802040000)
libwx_gtk2u_xrc-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_xrc-3.1.so.0 (0x00007f8801d36000)
libwx_gtk2u_html-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_html-3.1.so.0 (0x00007f8801a46000)
libwx_gtk2u_qa-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_qa-3.1.so.0 (0x00007f8801818000)
libwx_gtk2u_adv-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_adv-3.1.so.0 (0x00007f88013ed000)
libwx_gtk2u_core-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_gtk2u_core-3.1.so.0 (0x00007f8800b8a000)
libwx_baseu_xml-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_baseu_xml-3.1.so.0 (0x00007f8800975000)
libwx_baseu_net-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_baseu_net-3.1.so.0 (0x00007f880072e000)
libwx_baseu-3.1.so.0 => /home/igor/wxWidgets/buildGTK/lib/libwx_baseu-3.1.so.0 (0x00007f88002d3000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6 (0x00007f87ffedb000)
libm.so.6 => /lib64/libm.so.6 (0x00007f87ffbda000)
libc.so.6 => /lib64/libc.so.6 (0x00007f87ff842000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_s.so.1 (0x00007f87ff62b000)
libgtk-x11-2.0.so.0 => /usr/lib64/libgtk-x11-2.0.so.0 (0x00007f87fefe5000)
libgdk-x11-2.0.so.0 => /usr/lib64/libgdk-x11-2.0.so.0 (0x00007f87fed2e000)
libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0 (0x00007f87feb21000)
libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0 (0x00007f87fe8fb000)
libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007f87fe5d8000)
libgdk_pixbuf-2.0.so.0 => /usr/lib64/libgdk_pixbuf-2.0.so.0 (0x00007f87fe3b5000)
libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007f87fe034000)
libpangoft2-1.0.so.0 => /usr/lib64/libpangoft2-1.0.so.0 (0x00007f87fde1d000)
libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007f87fdbd1000)
libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007f87fd97d000)
libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f87fd73f000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f87fd498000)
libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007f87fd296000)
libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f87fcf5b000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f87fcc1c000)
libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007f87fca16000)
libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f87fc80d000)
libnotify.so.4 => /usr/lib64/libnotify.so.4 (0x00007f87fc605000)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f87fc3d0000)
libz.so.1 => /lib64/libz.so.1 (0x00007f87fc1b9000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007f87fbf61000)
libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007f87fbced000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f87fbae8000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f87fb8cd000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f87fb6a2000)
/lib64/ld-linux-x86-64.so.2 (0x000055d400ce6000)
libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007f87fb49d000)
libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f87fb297000)
libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007f87fb08d000)
libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007f87fae89000)
libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007f87fac79000)
libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f87faa6e000)
libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007f87fa862000)
libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007f87fa65f000)
libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007f87fa45c000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f87fa249000)
libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007f87f9f9f000)
libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007f87f9d7b000)
libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007f87f9b77000)
libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007f87f996d000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f87f9749000)
libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f87f94b1000)
librt.so.1 => /lib64/librt.so.1 (0x00007f87f92aa000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f87f9092000)
libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f87f8e2d000)
libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007f87f8c24000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f87f8a14000)
libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f87f87f7000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f87f85f2000)
libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007f87f83ef000)
libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0 (0x00007f87f81ea000)
libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 (0x00007f87f7fe2000)
libxcb-shape.so.0 => /usr/lib64/libxcb-shape.so.0 (0x00007f87f7ddd000)
libgbm.so.1 => /usr/lib64/libgbm.so.1 (0x00007f87f7bd1000)
libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007f87f79c2000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f87f77bd000)
libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f87f75b7000)
libglapi.so.0 => /usr/lib64/libglapi.so.0 (0x00007f87f7389000)
libxcb-glx.so.0 => /usr/lib64/libxcb-glx.so.0 (0x00007f87f716e000)
libxcb-dri3.so.0 => /usr/lib64/libxcb-dri3.so.0 (0x00007f87f6f6b000)
libxcb-present.so.0 => /usr/lib64/libxcb-present.so.0 (0x00007f87f6d68000)
libxcb-randr.so.0 => /usr/lib64/libxcb-randr.so.0 (0x00007f87f6b59000)
libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1 (0x00007f87f6952000)
libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1 (0x00007f87f674f000)
libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f87f6521000)
此外,安装日志的相关部分:
Making install in libfieldswindow
make[1]: Entering directory '/home/igor/dbhandler/Debug/libfieldswindow'
make[2]: Entering directory '/home/igor/dbhandler/Debug/libfieldswindow'
/bin/mkdir -p '/usr/local/lib'
/bin/sh ../libtool --mode=install /usr/bin/install -c libfieldswindow.la '/usr/local/lib'
libtool: warning: relinking 'libfieldswindow.la'
libtool: install: (cd /home/igor/dbhandler/Debug/libfieldswindow; /bin/sh "/home/igor/dbhandler/Debug/libtool" --tag CXX --mode=relink g++ -I../../libshapeframework -I/home/igor/wxWidgets/buildGTK/lib/wx/include/gtk2-unicode-3.1 -I/home/igor/wxWidgets/include -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g -O0 -std=c++11 -L../libshapeframework -lshapeframework -L/home/igor/wxWidgets/buildGTK/lib -pthread -Wl,-rpath,/home/igor/wxWidgets/buildGTK/lib -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -o libfieldswindow.la -rpath /usr/local/lib libfieldswindow_la-field.lo libfieldswindow_la-fieldswindow.lo libfieldswindow_la-fieldwindow.lo )
libtool: relink: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/crtbeginS.o .libs/libfieldswindow_la-field.o .libs/libfieldswindow_la-fieldswindow.o .libs/libfieldswindow_la-fieldwindow.o -L../libshapeframework -L/usr/local/lib -lshapeframework -L/home/igor/wxWidgets/buildGTK/lib -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/crtn.o -pthread -g -O0 -pthread -Wl,-rpath -Wl,/home/igor/wxWidgets/buildGTK/lib -pthread -Wl,-soname -Wl,libfieldswindow.so.0 -o .libs/libfieldswindow.so.0.0.0
libtool: install: /usr/bin/install -c .libs/libfieldswindow.so.0.0.0T /usr/local/lib/libfieldswindow.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libfieldswindow.so.0.0.0 libfieldswindow.so.0 || { rm -f libfieldswindow.so.0 && ln -s libfieldswindow.so.0.0.0 libfieldswindow.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libfieldswindow.so.0.0.0 libfieldswindow.so || { rm -f libfieldswindow.so && ln -s libfieldswindow.so.0.0.0 libfieldswindow.so; }; })
libtool: install: /usr/bin/install -c .libs/libfieldswindow.lai /usr/local/lib/libfieldswindow.la
libtool: install: /usr/bin/install -c .libs/libfieldswindow.a /usr/local/lib/libfieldswindow.a
libtool: install: chmod 644 /usr/local/lib/libfieldswindow.a
libtool: install: ranlib /usr/local/lib/libfieldswindow.a
libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/igor/dbhandler/Debug/libfieldswindow'
make[1]: Leaving directory '/home/igor/dbhandler/Debug/libfieldswindow'
Making install in libdialogs
make[1]: Entering directory '/home/igor/dbhandler/Debug/libdialogs'
make[2]: Entering directory '/home/igor/dbhandler/Debug/libdialogs'
/bin/mkdir -p '/usr/local/lib'
/bin/sh ../libtool --mode=install /usr/bin/install -c libdialogs.la '/usr/local/lib'
libtool: warning: relinking 'libdialogs.la'
libtool: install: (cd /home/igor/dbhandler/Debug/libdialogs; /bin/sh "/home/igor/dbhandler/Debug/libtool" --tag CXX --mode=relink g++ -I../../dbinterface -I../../libfieldswindow -I../../libshapeframework -I/home/igor/wxWidgets/buildGTK/lib/wx/include/gtk2-unicode-3.1 -I/home/igor/wxWidgets/include -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g -O0 -std=c++11 -L../libsqlite -L../libshapeframework/ -L../dbinterface -L../libfieldswindow -ldbinterface -lsqlite_lib -lshapeframework -lfieldswindow -L/home/igor/wxWidgets/buildGTK/lib -pthread -Wl,-rpath,/home/igor/wxWidgets/buildGTK/lib -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -o libdialogs.la -rpath /usr/local/lib libdialogs_la-databasetype.lo libdialogs_la-dialogs.lo libdialogs_la-odbcconfigure.lo libdialogs_la-selecttables.lo libdialogs_la-createindex.lo )
libtool: relink: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/crtbeginS.o .libs/libdialogs_la-databasetype.o .libs/libdialogs_la-dialogs.o .libs/libdialogs_la-odbcconfigure.o .libs/libdialogs_la-selecttables.o .libs/libdialogs_la-createindex.o -L/home/igor/dbhandler/Debug/libshapeframework/.libs -L../libsqlite -L../libshapeframework/ -L../dbinterface -L../libfieldswindow -L/usr/local/lib -lsqlite_lib -ldbinterface -L/home/igor/wxWidgets/buildGTK/lib -lfieldswindow -L../libshapeframework -lshapeframework -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/crtn.o -pthread -g -O0 -pthread -Wl,-rpath -Wl,/home/igor/wxWidgets/buildGTK/lib -pthread -Wl,-soname -Wl,libdialogs.so.0 -o .libs/libdialogs.so.0.0.0
libtool: install: /usr/bin/install -c .libs/libdialogs.so.0.0.0T /usr/local/lib/libdialogs.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libdialogs.so.0.0.0 libdialogs.so.0 || { rm -f libdialogs.so.0 && ln -s libdialogs.so.0.0.0 libdialogs.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libdialogs.so.0.0.0 libdialogs.so || { rm -f libdialogs.so && ln -s libdialogs.so.0.0.0 libdialogs.so; }; })
libtool: install: /usr/bin/install -c .libs/libdialogs.lai /usr/local/lib/libdialogs.la
libtool: install: /usr/bin/install -c .libs/libdialogs.a /usr/local/lib/libdialogs.a
libtool: install: chmod 644 /usr/local/lib/libdialogs.a
libtool: install: ranlib /usr/local/lib/libdialogs.a
libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/igor/dbhandler/Debug/libdialogs'
make[1]: Leaving directory '/home/igor/dbhandler/Debug/libdialogs'
看起来在“make install”期间,libdialogs.so.0会丢失依赖项。
有什么想法吗?它是libdialogs的Makefile生成中的错误吗?
以下是Anjuta中的libdialogs-> Properties-> Linker选项:
-L../libsqlite -L../libshapeframework/ -L../dbinterface -L../libfieldswindow -ldbinterface -lsqlite_lib -lshapeframework -lfieldswindow `/home/igor/wxWidgets/buildGTK/wx-config --libs`
[/编辑]
[EDIT2]
igor@IgorDellGentoo ~/dbhandler $ grep -ri "mode=relink" *
Debug/libdbwindow/libdbwindow.la:relink_command="(cd /home/igor/dbhandler/Debug/libdbwindow; /bin/sh \"/home/igor/dbhandler/Debug/libtool\" --silent --tag CXX --mode=relink g++ -I../../libshapeframework -I../../dbinterface -I/home/igor/wxWidgets/buildGTK/lib/wx/include/gtk2-unicode-3.1 -I/home/igor/wxWidgets/include -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g -O0 -std=c++11 -L../libshapeframework -L../libfieldswindow -lfieldswindow -lshapeframework -L/home/igor/wxWidgets/buildGTK/lib -pthread -Wl,-rpath,/home/igor/wxWidgets/buildGTK/lib -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -o libdbwindow.la -rpath /usr/local/lib libdbwindow_la-ErdForeignKey.lo libdbwindow_la-ErdTable.lo libdbwindow_la-NArrow.lo libdbwindow_la-OneArrow.lo libdbwindow_la-column.lo libdbwindow_la-constraint.lo libdbwindow_la-table.lo libdbwindow_la-GUIDatabaseTable.lo libdbwindow_la-databasecanvas.lo libdbwindow_la-databasedoc.lo libdbwindow_la-databaseview.lo libdbwindow_la-dbview.lo libdbwindow_la-MyErdTable.lo libdbwindow_la-ErdLineShape.lo @inst_prefix_dir@)"
Debug/libtool: relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
Debug/libfieldswindow/libfieldswindow.la:relink_command="(cd /home/igor/dbhandler/Debug/libfieldswindow; /bin/sh \"/home/igor/dbhandler/Debug/libtool\" --silent --tag CXX --mode=relink g++ -I../../libshapeframework -I/home/igor/wxWidgets/buildGTK/lib/wx/include/gtk2-unicode-3.1 -I/home/igor/wxWidgets/include -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g -O0 -std=c++11 -L../libshapeframework -lshapeframework -L/home/igor/wxWidgets/buildGTK/lib -pthread -Wl,-rpath,/home/igor/wxWidgets/buildGTK/lib -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -o libfieldswindow.la -rpath /usr/local/lib libfieldswindow_la-field.lo libfieldswindow_la-fieldswindow.lo libfieldswindow_la-fieldwindow.lo @inst_prefix_dir@)"
Debug/libdialogs/libdialogs.la:relink_command="(cd /home/igor/dbhandler/Debug/libdialogs; /bin/sh \"/home/igor/dbhandler/Debug/libtool\" --silent --tag CXX --mode=relink g++ -I../../dbinterface -I../../libfieldswindow -I../../libshapeframework -I/home/igor/wxWidgets/buildGTK/lib/wx/include/gtk2-unicode-3.1 -I/home/igor/wxWidgets/include -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g -O0 -std=c++11 -L../libsqlite -L../libshapeframework/ -L../dbinterface -L../libfieldswindow -ldbinterface -lsqlite_lib -lshapeframework -lfieldswindow -L/home/igor/wxWidgets/buildGTK/lib -pthread -Wl,-rpath,/home/igor/wxWidgets/buildGTK/lib -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -o libdialogs.la -rpath /usr/local/lib libdialogs_la-databasetype.lo libdialogs_la-dialogs.lo libdialogs_la-odbcconfigure.lo libdialogs_la-selecttables.lo libdialogs_la-createindex.lo @inst_prefix_dir@)"
Debug/libdbloader/libdbloader.la:relink_command="(cd /home/igor/dbhandler/Debug/libdbloader; /bin/sh \"/home/igor/dbhandler/Debug/libtool\" --silent --tag CXX --mode=relink g++ -I/usr/include -I../../dbinterface -I../../libsqlite -I../../libodbc -I/home/igor/wxWidgets/buildGTK/lib/wx/include/gtk2-unicode-3.1 -I/home/igor/wxWidgets/include -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g -O0 -std=c++11 -L../libsqlite -L../libodbc -L/home/igor/wxWidgets/buildGTK/lib -pthread -Wl,-rpath,/home/igor/wxWidgets/buildGTK/lib -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_adv-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -lsqlite_lib -lodbc_lib -o libdbloader.la -rpath /usr/local/lib libdbloader_la-dbloader.lo @inst_prefix_dir@)"
ltmain.sh: relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
因此,引用“relink”的唯一位置是Debug /目录中的文件。现在的问题是:这个文件是从哪里生成的?
由于Anjuta正在使用autotools,我认为如果我更改Debug / libdialogs / libdialogs.la的父文件,一切都会没问题。
[/ EDIT2]
谢谢。