what does “TERM environment variable not set” mean?

别说谁变了你拦得住时间么 提交于 2020-01-05 09:01:35

问题


I was writing a simple console application in Objective C.

I have tried system("clear") but I am getting this message on console

"TERM environment variable not set."

Can anyone explain me what this is all about ?

I am very new to both OSX and Objective C. and I am sorry if this question is too dumb as I have not programmed much on *nix. (I have been doing a lot of Java and PHP development in my college days).


回答1:


The TERM environment variable tells your program what type of terminal its running on. Each type of terminal displays data and responds to commands in its own way. For example, a VT100 terminal works quite differently from a IBM 3270 terminal.

The error message you're seeing says that the TERM environment variable isn't set, probably because you're trying to launch your program from within Xcode. You can add environment variables to be set in Xcode 4's scheme settings. As rob mayoff points out below, though, Xcode's console isn't a proper terminal emulator, so trying to run your program within Xcode isn't going to give you the results you're looking for.



来源:https://stackoverflow.com/questions/8470184/what-does-term-environment-variable-not-set-mean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!