minpla
13-10-2007 09:53:52
I can perfectly compile dynamically my application, but I need to compile it statically, for the students don't worry to install all the libraries dependencies.
Well, my problem is that in the linking process the compiler doesn't link the libode.so.
This is the linking command:
At this moment I haven't got any error, but then I watch the executable dependencies (ldd myexecutable), says this:
libode.so => not found. Why the normal compilation finds this library, that is installed in /usr/local/lib, but in static compilation not???
Perhaps there are a strange think in the second autogenerated linking command:
[...] -L/home/DescIns/ogreode_v2/src [...]
Why the linker knows where I have the unpacked the OgreOde package? And why does it need this if all the libraries are installed in /usr/local/lib?
Thanks,
Ivan.
Well, my problem is that in the linking process the compiler doesn't link the libode.so.
This is the linking command:
/bin/bash ../libtool --tag=CXX --mode=link g++ -DOGRE_GUI_GLX -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -g -O2 -o ogrebots -static -lOgreOde_Core -lOgreOde_Prefab -lOgreOde_Loader -lOIS -L/usr/lib -laudiere ogrebots.o Combat.o Mission.o verilogNetlistLexer.o verilogNetlistParser.o verilogModel.o circuitSimulator.o textRenderer.o robot.o sensor.o actuator.o vehicle.o engine.o wheel.o prefabObject.o basicGates.o -L/usr/local/lib -lOgreMain
g++ -DOGRE_GUI_GLX -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/local/include -I/usr/local/include/OGRE -g -O2 -o ogrebots ogrebots.o Combat.o Mission.o verilogNetlistLexer.o verilogNetlistParser.o verilogModel.o circuitSimulator.o textRenderer.o robot.o sensor.o actuator.o vehicle.o engine.o wheel.o prefabObject.o basicGates.o -L/usr/local/lib /usr/local/lib/libOgreOde_Prefab.a -L/home/DescIns/ogreode_v2/src /usr/local/lib/libOgreOde_Loader.a /usr/local/lib/libOgreOde_Core.a -lode /usr/local/lib/libOIS.a -L/usr/X11R6/lib -L/usr/lib /usr/lib/libaudiere.a /usr/lib/libvorbisfile.a /usr/lib/libvorbis.a /usr/lib/libogg.a -lrt /usr/lib/libcdaudio.a -ldumb /usr/lib/libFLAC.a /usr/local/lib/libOgreMain.a /usr/lib/libfreetype.a /usr/local/lib/libzzip.a -lX11 -lXaw -lXt -lSM -lICE -lCg -lfreeimage -lpthread -lz -ldl
At this moment I haven't got any error, but then I watch the executable dependencies (ldd myexecutable), says this:
linux-gate.so.1 => (0xffffe000)
libode.so => not found
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7fb2000)
libdumb.so.1 => /usr/lib/libdumb.so.1 (0xb7f69000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7ea0000)
libXaw.so.7 => /usr/lib/libXaw.so.7 (0xb7e49000)
libXt.so.6 => /usr/lib/libXt.so.6 (0xb7dfb000)
libSM.so.6 => /usr/lib/libSM.so.6 (0xb7df2000)
libICE.so.6 => /usr/lib/libICE.so.6 (0xb7dda000)
libCg.so => /usr/lib/libCg.so (0xb7acb000)
libfreeimage.so.3 => /usr/lib/libfreeimage.so.3 (0xb796c000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7959000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7945000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7941000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7862000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb783b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7830000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb76fc000)
/lib/ld-linux.so.2 (0xb7fcb000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb76f9000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb76f4000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb76e7000)
libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb76d1000)
libXpm.so.4 => /usr/lib/libXpm.so.4 (0xb76c1000)
libode.so => not found. Why the normal compilation finds this library, that is installed in /usr/local/lib, but in static compilation not???
Perhaps there are a strange think in the second autogenerated linking command:
[...] -L/home/DescIns/ogreode_v2/src [...]
Why the linker knows where I have the unpacked the OgreOde package? And why does it need this if all the libraries are installed in /usr/local/lib?
Thanks,
Ivan.