Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. system environment configure
Forum Updated to NodeBB v4.3 + New Features

system environment configure

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 2 Posters 720 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • small_birdS Offline
    small_birdS Offline
    small_bird
    wrote on last edited by aha_1980
    #1
    /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:
    01a00469-ccb8-4bf0-8cb7-230bd045e436-image.png
    could any one offer me a hand? thanks in advance!

    jsulmJ 1 Reply Last reply
    0
    • small_birdS small_bird
      /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:
      01a00469-ccb8-4bf0-8cb7-230bd045e436-image.png
      could any one offer me a hand? thanks in advance!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @small_bird said in system environmet configure:

      __COBOTSYS_MODULE_NAME__

      You have underscores as prefix and postfix.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      small_birdS 2 Replies Last reply
      1
      • jsulmJ jsulm

        @small_bird said in system environmet configure:

        __COBOTSYS_MODULE_NAME__

        You have underscores as prefix and postfix.

        small_birdS Offline
        small_birdS Offline
        small_bird
        wrote on last edited by
        #3

        @jsulm yes, I ignore the prefix and postfix and set it as system env var like this :

        COBOTSYS_MODULE_NAME /home/cobot
        

        however, the errors are the same!!

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @small_bird said in system environmet configure:

          __COBOTSYS_MODULE_NAME__

          You have underscores as prefix and postfix.

          small_birdS Offline
          small_birdS Offline
          small_bird
          wrote on last edited by
          #4

          @jsulm adding the prefix and postfix or not does not affect the result

          jsulmJ 1 Reply Last reply
          0
          • small_birdS small_bird

            @jsulm adding the prefix and postfix or not does not affect the result

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @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.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            small_birdS 1 Reply Last reply
            2
            • jsulmJ jsulm

              @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_birdS Offline
              small_birdS Offline
              small_bird
              wrote on last edited by
              #6

              @jsulm yes, I copy the variable into the env configure dialog. result remains the same!

              jsulmJ 1 Reply Last reply
              0
              • small_birdS small_bird

                @jsulm yes, I copy the variable into the env configure dialog. result remains the same!

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @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.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                small_birdS 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @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_birdS Offline
                  small_birdS Offline
                  small_bird
                  wrote on last edited by
                  #8

                  @jsulm no, I want to define the var to eliminate the output error.

                  jsulmJ 1 Reply Last reply
                  0
                  • small_birdS small_bird

                    @jsulm no, I want to define the var to eliminate the output error.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @small_bird As I said if you want env variable then you have to read it at runtime...

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved