Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat Newsgroups: comp.os.linux.development.apps Subject: Re: Linking problem Date: Fri, 16 Dec 2011 00:47:10 +0000 Lines: 33 Message-ID: <874nx17375.fsf@sapphire.mobileactivedefense.com> References: <20111215001104.13eda1b8@efreet.linux> <8762himaw3.fsf@sapphire.mobileactivedefense.com> <20111215162948.60b95d1c@efreet.linux> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net IvwSmCHhpEVamWWzomWrmAT1nZSJDvh9ed/tTgAIgbjljn+qg= Cancel-Lock: sha1:viiimlOtDJHUfOV2R6RGovQlxpE= sha1:QNHYQd2qkpp+bmG74Y6U5tXWetA= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:329 Kevin Nathan writes: > On Thu, 15 Dec 2011 09:39:40 +0000 > Rainer Weikusat wrote: > >>Kevin Nathan writes: >>> I have just been tasked with maintaining a KDE/Qt app originally >>> written in 2004/2005 and parts of it updated in 2009. It is currently >>> compiling on a KDE 3.5.7 and Qt 3.0 system and needs to be able to >>> run on systems with various versions of KDE. >> >>Chances are that the -rpath or -R linker options do what you >>need. You'll have to ship the libraries and the binaries which need >>them and know the place where the libraries will be installed. > > I already have this ready, by copying everything necessary under the > home dir and will have an install CD for them to run. It's been years > since I built an RPM, so that is next on my list. :-) > >>The compiler will also need suitable -I options to find the 'custom' >>headers and the linker additional -L to find them at link time. >> > > I've noticed that the "--sysroot" puts the -R in front of the header > includes, so I just have to figure out what I am missing during the > linking step. My current problem here is to inhibit the system > libraries. I've added the LDFLAGS=--sysroot=DIR but I must be missing > something. I will be digging into it more, tonight. Forget --sysroot. You need to add your include directories with -I, add your library directories with -L and add them again with -Wl,-R and that's it. If the binaries are still linked against system libraries you don't want, something is still missing in your custom library directory.