This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-1.1b/Solaris 2.5.1: problems with version numbers in dynamic libraries



  In message <199809081540.RAA13516@orcanie.shfj.cea.fr>you write:
  > I have problems using dynamic libraries with version numbers.
  > Here is a small exeample with a dynamic library "library"
  > version 1.0 and a program "exe" which tries to use it:
  > 	% g++ -fpic  -c exe.cc
  > 	% g++ -fpic  -c library.cc
  > 	% g++ -shared -o liblibrary.so.1.0 library.o
  > 	% ln -s liblibrary.so.1.0 liblibrary.so
  > 	% g++ -o exe exe.o -L/home/papadopo/TOTO -llibrary
  > 	% 
  > 
  > The problem is that "exe" is linked against "liblibrary.so"
  > instead of "liblibrary.so.1.0":
  > 	% ldd exe
  > 	        liblibrary.so =>         ./liblibrary.so
  > 	[...]
  > 	% 
  > 
  > This was not the case with egcs-1.0.2:
  > 	% ldd exe
  > 	        liblibrary.so.1.0 =>     ./liblibrary.so.1.0
  > 	[...]
  > 	% 
  > 
  > The program won't run unless "liblibrary.so" is in the
  > LD_LIBRARY_PATH. "liblibrary.so.1.0" won't do.
  > 
  > Is this a bug? Am I missing something?
This seems more like a linker issue.  egcs does not (to the best of
my knowledge) only specifies -llibrary to the linker and it is up to
the linker to select the appropriate library.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]