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. libssh2 and QT
QtWS25 Last Chance

libssh2 and QT

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 3.8k 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.
  • Z Offline
    Z Offline
    zemcos
    wrote on last edited by
    #1

    Good day Guys,

    Please help, I have tried everything with no joy.
    If i add the libssh2 library in my program i get the following error when i try and use a libssh2 variable.
    error: undefined reference to `_RTC_CheckEsp'
    I get 369 of these erorrs.0_1540395635854_profile.PNG 0_1540395645441_errors.PNG

    I am new in qt please give detailed instructions on how to resolve if you have a solution.
    OS: Windows 10 64 bit
    Qt 5.11.2

    JonBJ 1 Reply Last reply
    0
    • Z zemcos

      Good day Guys,

      Please help, I have tried everything with no joy.
      If i add the libssh2 library in my program i get the following error when i try and use a libssh2 variable.
      error: undefined reference to `_RTC_CheckEsp'
      I get 369 of these erorrs.0_1540395635854_profile.PNG 0_1540395645441_errors.PNG

      I am new in qt please give detailed instructions on how to resolve if you have a solution.
      OS: Windows 10 64 bit
      Qt 5.11.2

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

      @zemcos
      This looks as though it might be to do with a mix up over C runtime libraries and debug/release versions.

      First things first: since you added "the libssh2 library in my program", have you cleaned out completely any builds you did previously, and made everything rebuild from scratch?

      Otherwise: it might help if you said whether you are trying/intending to build for Release or Debug?

      And btw, you are indeed using gcc/MinGW as your compiler, not MSVC. Right?

      Z 1 Reply Last reply
      1
      • JonBJ JonB

        @zemcos
        This looks as though it might be to do with a mix up over C runtime libraries and debug/release versions.

        First things first: since you added "the libssh2 library in my program", have you cleaned out completely any builds you did previously, and made everything rebuild from scratch?

        Otherwise: it might help if you said whether you are trying/intending to build for Release or Debug?

        And btw, you are indeed using gcc/MinGW as your compiler, not MSVC. Right?

        Z Offline
        Z Offline
        zemcos
        wrote on last edited by
        #3

        @JonB

        Good day,

        Thanks for the reply

        i am using mingw 32bit and building for Release.
        I have cleaned the builds over and over but get the same error.

        JonBJ 1 Reply Last reply
        0
        • Z zemcos

          @JonB

          Good day,

          Thanks for the reply

          i am using mingw 32bit and building for Release.
          I have cleaned the builds over and over but get the same error.

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

          @zemcos
          I must warn you: I don't use C, Windows, .pro/cmake files etc. So you won't get any examples from me, I can only point you where I would look.

          You say this only happens when you link with libssh2. I suspect that _RTC_CheckEsp would be a debug-only function. That would indicate that the library files being linked are somehow compiled for debug rather than release themselves. (If it's easy for you to do, you might check whether the errors go away if you do compile for debug.) Make sure it's using the appropriate link line from the conditional lines in the .pro file you show, and that the right file there is being used. BTW, when you added libssh2 to your project, did you not also have to add any further libraries for it?

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zemcos
            wrote on last edited by
            #5

            i cmake built the libraries which required libs from openssl but didn't add any into my project

            Pablo J. RoginaP 1 Reply Last reply
            0
            • Z zemcos

              i cmake built the libraries which required libs from openssl but didn't add any into my project

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @zemcos same warning as @JonB did, not that I use Windows that much.
              Searching for unresolved external symbol __RTC_CheckEsp I found several entries, like this one so it seems like a specific MSVC thing.

              So given that condition, could it be possible that you're building the library with MinGW but using MSCV switches instead?

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                zemcos
                wrote on last edited by
                #7

                Good day Pablo,

                You are right, what is recommended for building binaries for libssh2?

                jsulmJ JonBJ Pablo J. RoginaP 3 Replies Last reply
                0
                • Z zemcos

                  Good day Pablo,

                  You are right, what is recommended for building binaries for libssh2?

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

                  @zemcos said in libssh2 and QT:

                  You are right, what is recommended for building binaries for libssh2?

                  Use same compiler you use for your app

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

                  1 Reply Last reply
                  2
                  • Z zemcos

                    Good day Pablo,

                    You are right, what is recommended for building binaries for libssh2?

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

                    @zemcos
                    If you are saying you compiled the ssh libraries, why would you not use the same compiler as you do for your program? Anyway, it is vitally important that you use the same compiler and similar/compatible compiler options for any libraries you want to link against your app. You cannot use libraries compiled with one complier/set of switches against an application compiled with a different compiler/set of switches.

                    1 Reply Last reply
                    1
                    • Z zemcos

                      Good day Pablo,

                      You are right, what is recommended for building binaries for libssh2?

                      Pablo J. RoginaP Offline
                      Pablo J. RoginaP Offline
                      Pablo J. Rogina
                      wrote on last edited by
                      #10

                      @zemcos said in libssh2 and QT:

                      what is recommended for building binaries for libssh2?

                      I'm afraid I cannot help you here directly, but let me ask you how did you build the library yourself? Could you please provide the full command line/switches/etc you have used?

                      As mentioned before, it's very important that you use the same compiler to build both the supporting libraries and your application.

                      Looking briefly at libssh2 code, it has support for building it with CMake or autotools so you have choices to pick from.

                      In addition, building this library could be considered out of scope for Qt itself...

                      Upvote the answer(s) that helped you solve the issue
                      Use "Topic Tools" button to mark your post as Solved
                      Add screenshots via postimage.org
                      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                      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