Omake getenv - 找不到环境变量

时间:2017-08-16 16:30:55

标签: getenv omake

我的bash环境中存在的一些环境变量(在.bashrc中设置)不会被getenv读取(它说它们未定义)。它是在寻找其他环境吗?或....?

monster@Tangerine ~/Casey/piano-core $ omake
*** omake: reading OMakefiles
--- Checking for ocamlfind... (found /home/monster/ocamlbrew/ocaml-4.02.3/.opam/4.02.2/bin/ocamlfind)
--- Checking for ocamlc.opt... (found /home/monster/ocamlbrew/ocaml-4.02.3/.opam/4.02.2/bin/ocamlc.opt)
--- Checking for ocamlopt.opt... (found /home/monster/ocamlbrew/ocaml-4.02.3/.opam/4.02.2/bin/ocamlopt.opt)
--- Checking whether ocamlc understands the "z" warnings... (yes)
*** omake error:
   File _build/score-player/stubs/OMakefile: line 14, characters 8-30
   undefined environment variable: SCORE_PLAYER
monster@Tangerine ~/Casey/piano-core $ $SCORE_PLAYER
bash: /home/monster/Casey/score-player: Is a directory
monster@Tangerine ~/Casey/piano-core $ rlwrap osh
% getenv(SCORE_PLAYER)
*** omake error:
   File -: line 1, characters 0-20
   undefined environment variable: SCORE_PLAYER
% 

1 个答案:

答案 0 :(得分:0)

好的,所以我通过将变量放在/ etc / environment而不是〜/ .bashrc中来解决这个问题。我想我不太了解哪个环境是哪个......