Re: How do I change Environment variables
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: How do I change Environment variables
- From: Rob Kendrick <lua-l@...>
- Date: 2007年1月27日 23:32:52 +0000
On Sat, 2007年01月27日 at 10:13 -0500, RJP Computing wrote:
> How can I change environment variables so that I can then use
> os.execute() to run a program the looks for a specific environment
> variable to be set. (ie. PATH or INCLUDE or LIB) I want to fire off a
> compiler.
You can't. At least not directly. Lua's written in ANSI C, and
therefor does not have a setenv() to go along with getenv()/main()'s
third parameter.
You can either bind your OS's setenv-like/spawn-like API calls yourself,
or do the evil thing and generate a shell script/batch file that does
the right thing, and then run that.
B.