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. Error 'isRelocatable': undeclared identifier.
Forum Updated to NodeBB v4.3 + New Features

Error 'isRelocatable': undeclared identifier.

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 3 Posters 1.9k Views
  • 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.
  • W Offline
    W Offline
    wasimIM
    wrote on last edited by wasimIM
    #1

    Hi all,

    I have integrated few QT libraries in my desktop project. Previously used an older version of QT, currently updated it to 6.7.3. I am facing a build error of " 'isRelocatable': undeclared identifier. " after building my solution. I am building using visual studio 2022. I tried both versions of QT 6.7.3 and 6.8.1 issue reproduces for both the versions. I see a similar bug here, tried disabling /Zc:twoPhase- but prompts me with another compiler error saying two-phase name lookup is not supported for C++/CLI. any solutions to it? Could someone please help me with it.

    Thanks

    jsulmJ 1 Reply Last reply
    0
    • W wasimIM

      Hi all,

      I have integrated few QT libraries in my desktop project. Previously used an older version of QT, currently updated it to 6.7.3. I am facing a build error of " 'isRelocatable': undeclared identifier. " after building my solution. I am building using visual studio 2022. I tried both versions of QT 6.7.3 and 6.8.1 issue reproduces for both the versions. I see a similar bug here, tried disabling /Zc:twoPhase- but prompts me with another compiler error saying two-phase name lookup is not supported for C++/CLI. any solutions to it? Could someone please help me with it.

      Thanks

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

      @wasimIM said in Error 'isRelocatable': undeclared identifier.:

      'isRelocatable': undeclared identifier.

      From where is it coming? You really should provide more context and the full error message.

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

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wasimIM
        wrote on last edited by wasimIM
        #3

        @jsulm I have included few headers into my project. Sharing an image below. and the errors where it points to.

        image.png

        jsulmJ 1 Reply Last reply
        0
        • W wasimIM

          @jsulm I have included few headers into my project. Sharing an image below. and the errors where it points to.

          image.png

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

          @wasimIM It looks like you have a linker error, but you hide the relevant information there, so don't know

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

          1 Reply Last reply
          1
          • W Offline
            W Offline
            wasimIM
            wrote on last edited by
            #5

            @jsulm the linking error was due to the above compile error use nativeTerritoryName() instead. I have changed that. Now both first compile error and second link error has gone, only remaining with 'isRelocatable' errors.

            1 Reply Last reply
            0
            • W Offline
              W Offline
              wasimIM
              wrote on last edited by
              #6

              image.png

              1 Reply Last reply
              0
              • W Offline
                W Offline
                wasimIM
                wrote on last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  wasimIM
                  wrote on last edited by
                  #8

                  It directs to this macro definition inside qtypeinfo.h, here if we remove the static_assert, then it builds fine.
                  image.png

                  JonBJ 1 Reply Last reply
                  0
                  • W wasimIM

                    It directs to this macro definition inside qtypeinfo.h, here if we remove the static_assert, then it builds fine.
                    image.png

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #9

                    @wasimIM
                    I think that is as per the https://bugreports.qt.io/browse/QTBUG-123922 you referenced. A post there says

                    isRelocatable is both defined and used there.

                    Between 6.6 and 6.7, we added that static_assert (in ff7d69dafda2f2cdc3a93f76ed8f77a113ac1a1c), so it has to be the reason why it is failing now. But there's nothing wrong with this code.

                    I think they are saying there is nothing wrong with the code but there is with MSVC 2022. Not sure that code is going to get changed by Qt.

                    1 Reply Last reply
                    0
                    • W Offline
                      W Offline
                      wasimIM
                      wrote on last edited by
                      #10

                      @jsulm any solutions you see? Or do I need to provide any other info?

                      jsulmJ 1 Reply Last reply
                      0
                      • W wasimIM

                        @jsulm any solutions you see? Or do I need to provide any other info?

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

                        @wasimIM I don't have a solution. Maybe try with more recent MS compiler if there is a newer version?

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

                        1 Reply Last reply
                        0

                        • Login

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