system environment configure
-
/home/cobot/Desktop/cobotsys_sdk/install/x86-64-install/devel/include/Tiger.Common/logger/Logger.h:21: error: ‘__COBOTSYS_MODULE_NAME__’ was not declared in this scope #define LOG_INFO google::LogMessage(__COBOTSYS_MODULE_NAME__, __FILE__, __LINE__, google::GLOG_INFO).stream() ^
hello everyone, in one qt-project, I came across this problem. However, the env has been set like the following pic:
could any one offer me a hand? thanks in advance! -
@small_bird said in system environmet configure:
__COBOTSYS_MODULE_NAME__
You have underscores as prefix and postfix.
-
@small_bird What I mean is: you should use same name for the variable, either both (in env and code) with underscores or both without.
-
@small_bird One moment - what you're trying works only for defines (-DCOBOTSYS_MODULE_NAME ...), not for env variables!
See https://doc.qt.io/qt-5/qmake-variable-reference.html#defines
If you want to use env variables, you need to check their values in qmake and set the define accordingly. -
@small_bird As I said if you want env variable then you have to read it at runtime...