[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Implicit linking of local .so
On 02-Dec-1999 Mads Bondo Dydensborg wrote:
> On Thu, 2 Dec 1999, Steve Baker wrote:
>
>> Oh - I see. 'export' is a Bourne-shell thing - so it's bound to
>> be in the Posix spec.
'export' works on bash, bsh, ksh, and the derivatives. 'set' is the comparable
command for csh based shells. I know that freebsd and solaris default to csh
based, while linux and aix default to bsh based (linux is bash, aix is ksh). I
like shells :) wanna see my seashell collection?
>
> My mistake.
>
>>
>> That's what export does.
>>
>> Without export, the variable is confined to the current shell
>> and is NOT passed on to daughter shells or programs.
>>
>> With export, the variable is passed down to daughter shells
>> and programs - but not 'up' to parent shells or programs.
>
> Hm. I think we agree here (and you obviously know what you are saying).
hehehe, is this where I start arguing? (about the stuff in the parenthesis? ;)
>
>>
>> AFAIK, there is no way to make the change in a variable have
>> an effect on the script/program that created this shell. That
>> would be "A Bad Thing" indeed - which is why UNIX makes it
>> (essentially) impossible.
>
> Yes.
>
> What I was trying to suggest - and this may be wrong - is that the
> construct
>
> $> VARIABLE=VALUE executable_program
>
> makes VARIABLE available to executable_program, but not the current shell.
>
> I may be seriously misguided. My apologies.
>
this is correct. I often use this when working on opengl programs, so I can
control which executions get fullscreen and which executions don't.
Several variables can be set this way, and they only effect the program, not
any following programs
$ MESA_GLX_FX=f FX_GLIDE_NO_SPLASH=1 ./flex
I beleive this works on csh, too. T
#!/bin/sh
LD_LIBRARY_PATH=/something/lib /something/bin/somegame
> Mads
>
> --
> Mads Bondo Dydensborg. madsdyd@challenge.dk
> Faced with the prospect of rereading this book, I would rather have my brains
> ripped out by a plastic fork
> - Charles Cooper, ZD net, in review of B@TSOT by Bill Gates.
ok, now I'm gonna take a second to go back to the beginning of this thread, and
ask WHY? If this library is only going to be used in one application, what's
the point in dynamically linking? I think Pierre made an excellent point about
dynamically linking the working copy, then statically linking the release. I
guess it's moot as jason has found a solution, I just don't understand why it
has to be dynamically linked. There is no benifit in terms of hdd space,
memory, or speed... I'd imagine it'd take up more space, and my understanding
is that static binaries have a slight speed advantage of dynamically linked
bins...
-Erik <br0ke@math.smsu.edu> [http://math.smsu.edu/~br0ke]
The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep
Refrigerated.