automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build configuration help


From: Bob Rossi
Subject: Re: build configuration help
Date: Thu, 03 Apr 2008 11:23:23 -0400
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

On Thu, Apr 03, 2008 at 09:19:00AM -0600, John Calcote wrote:
> Bob Rossi wrote:
>> Will it only work if I install with the default installation directory? 
>> What if I change the --prefix=/home/bob/foo. Will /home/bob/foo/bin/bar
>> be able to find /home/bob/foo/lib/wxwidgets.so ?
>>   
> If you install libraries into a "non-standard" location, you're going to 
> have the same problems on Unix that you do on Windows. Windows has one 
> additional option for finding libraries in non-standard places - it always 
> looks in the same directory as the executable first for a DLL. You can 
> BUILD an application to install and run from a specific location - that is, 
> if you use a -R<libdir> option on your app's linker command line, the 
> system will look for libraries in that location, as well as the system 
> locations.
>
> The way you implement this is to use $(prefix)/lib, or $(libdir) in your -R 
> option, which will resolve to the configured library installation directory 
> - /home/bob/foo/lib. When you use -R like this, however, just realize that 
> this binary can only be installed on this one non-standard location (it can 
> still be installed in standard locations).
>
> The difference between windows and linux in this case, is that windows 
> allows you to run your binary from anywhere, and find the library in the 
> same relative location (the same directory, in fact). Linux doesn't allow 
> this because...can you guess? It's a security risk. Microsoft's taken a lot 
> of heat for this over the years.
>> OK, I didn't know this. That's awesome. Is this something that I can
>> count on being portable? Meaning, will it work on all the unix systems
>> you know about, or is it only a feature of gnu ld?
>>   
> This is fairly standard Unix fare.

Thank you so much. This has helped out A LOT.

Bob Rossi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]