Hi all! Dave, after all your first suggestion was the answer I needed: changing the variable LD_SONAME. I didn't see that right away...
So it's all good now. But I have a suggestion: why is it that the names libxerces-c.so.27 and libxerces-c.so.27.0 were chosen? Why not libxerces-c_27.so and libxerces-c_27_0.so, for instance? This would have the same effect, and this way we could use the same library libxerces-c.27.so to compile (with the flag -lxerces-c.27) and run the executables on the same machine, without the need for the links. Thanks everybody! Rafael -----Original Message----- From: Rafael Sousa (Ext_Altior) Sent: segunda-feira, 21 de Novembro de 2005 19:44 To: [email protected] Subject: RE: Can the Makefile be changed to compile directly only one library named libxerces-c.so ? Ok, I found out how to change the Makefile in order to change the name of the library to libxerces-c.so, but that still doen't work. When I try to run the programs, they still search for libxerces-c.so.27. So putting it simple: How can I avoid this? When I run the programs that use Xerces' library, I want them to search for libxerces-c.so, not libxerces-c.so.27... Thanks! Rafael -----Original Message----- From: Rafael Sousa (Ext_Altior) Sent: segunda-feira, 21 de Novembro de 2005 11:15 To: [email protected] Subject: RE: Can the Makefile be changed to compile directly only one library named libxerces-c.so ? Hi Dave! Thanks for your help, but I changed the LD_SONAME variable in Makefile.incl as you suggested, and the result is the same: the library name is libxerces-c.so.27.0, and there are 2 symbolic links that point to this one, named libxerces-c.so.27 and libxerces-c.so. The problem is that when I try to run a program, it keeps asking me for libxerces-c.so.27. And it's not very convenient to create the links, in my particular case. What I need is to be able to distribute xerces in the production system as a standalone library, without the links. So what (I think) I need is that when compiling the resulting library name is libxerces-c.so, so that I can compile the programs using -lxerces-c, and be able to run them, without any symbolic link. I'm hoping that this way when I try to run the programs, they won't search for libxerces-c.so.27... Any more ideas anyone? Thanks again, Rafael -----Original Message----- From: David Bertoni [mailto:[EMAIL PROTECTED] Sent: sábado, 19 de Novembro de 2005 2:17 To: [email protected] Subject: Re: Can the Makefile be changed to compile directly only one library named libxerces-c.so ? Rafael Sousa (Ext_Altior) wrote: > Hi David! > > But do you think that changing the Makefiles by hand so that the > resulting lib is directly named libxerces-c.so, and not > libxerces-c.so.27.0, will solve my problem, i.e., I will no longer get > these kind of errors that ask for libxerces-c.so.27 ? > > By the way, my platform is Solaris. > It's probably easier for you to just modify the Solaris-specifc section of src/xercesc/Makefile.incl to modify the LD_SONAME variable. You can change the following: LD_SONAME = -h ${SO_NAME} to: LD_SONAME = -h libxerces-c.so Note that you should be very careful about doing this is you plan to distribute your binary, or you expect it to work correctly on a system that has multiple versions of Xerces-C on it. Dave -----Original Message----- From: David Bertoni [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 18 de Novembro de 2005 23:40 To: [email protected] Subject: Re: Can the Makefile be changed to compile directly only one library named libxerces-c.so ? Rafael Sousa (Ext_Altior) wrote: > Hi all! > > How can I change the name of the library that results from compiling > Xerces? You will probably have to modify the Makefiles by hand. > > When I compile Xerces, I get a library named libxerces-c.so.27.0, and 2 > symbolic links referencing this library, named libxerces-c.so.27 and > libxerces-c.so. But why is this? Can't I just compile it directly to a > library named libxerces-c.so ? You don't state your platform, but this is a very typical naming scheme for ELF executables. > > This question might seem strange, but apparently just renaming the file > (from libxerces-c.so.27.0 to libxerces-c.so.27), isn't enough. When I > try to run a program that references the renamed libxerces-c.so (whose > makefile has -lxerces-c), I'm getting errors that ask for > libxerces-c.so.27... No, because the SONAME "libxerces-c.so.27" is embedded in the executable. I believe this is changing for 3.0, but I'm not sure what the state of that branch is. Dave
