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. Problem in use libssh (application crashed)
QtWS25 Last Chance

Problem in use libssh (application crashed)

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 3.0k 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.
  • MrErfanM Offline
    MrErfanM Offline
    MrErfan
    wrote on last edited by MrErfan
    #1

    Hello friends ,
    I want to use libssh library. I first downloaded version 0.7.2 of the library
    0_1504956321206_e09c2514-a4f5-4e1a-9cbb-3460443d9434-image.png
    And I opened a new project in Qt, And is included in .pro

    QT       += core gui network
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = untitled
    TEMPLATE = app
    DEFINES += QT_DEPRECATED_WARNINGS
    # Libssh:
    LIBS += -L$$PWD'/libssh/lib/' -lssh
    INCLUDEPATH += $$PWD'/libssh/include/'
    SOURCES += main.cpp\
            mainwindow.cpp
    HEADERS  += mainwindow.h
    FORMS    += mainwindow.ui
    

    And finally, I used a simple example ...
    But the program is crashed .
    0_1504900900304_f4e15fe6-9cc9-49c5-88ad-a3d4078b6a47-image.png
    where is the problem?
    tnx :x

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Might be unrelated but why do you have the MinGW version of that library highlighted while you are building for Visual Studio 2015 ?

      In any case, where are the .dlls located ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • MrErfanM Offline
        MrErfanM Offline
        MrErfan
        wrote on last edited by
        #3

        @SGaist said in Problem in use libssh (application crashed):

        Hi,
        Might be unrelated but why do you have the MinGW version of that library highlighted while you are building for Visual Studio 2015 ?
        In any case, where are the .dlls located ?
        thanks for your response ,
        Because of the absence of WebEngine in the MinGW compiler, I use the msvc compiler.

        Dll,Lib Libssh Locate :

        0_1504948390878_d5272f84-cd3d-4230-88a5-7b23f7fbca01-image.png

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Unless you downloaded some other packets named
          -msvc in the end, you are mixing compilers.

          1 Reply Last reply
          1
          • MrErfanM Offline
            MrErfanM Offline
            MrErfan
            wrote on last edited by
            #5

            No, I downloaded the msvc version

            mrjjM 1 Reply Last reply
            0
            • MrErfanM MrErfan

              No, I downloaded the msvc version

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @MrErfan
              Super. And that VS compiled DLL are compatible with
              vs 2015 ?

              1 Reply Last reply
              1
              • MrErfanM Offline
                MrErfanM Offline
                MrErfan
                wrote on last edited by
                #7

                I do not know, I just downloaded libssh from here And I used it in my project

                mrjjM 1 Reply Last reply
                1
                • MrErfanM MrErfan

                  I do not know, I just downloaded libssh from here And I used it in my project

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @MrErfan
                  Ok. i also tried to look at site but its not clear what VS was used.
                  It looks like a c api so not sure how compatible the dlls are.
                  When c++ Api, its very sensitive.

                  If you have cmake installed, then maybe just build it your self to be
                  sure ?

                  Did you single step the application?
                  Do you know if it crashes before main or first when you
                  use it in main ?
                  (the my_ssh_session stuff)

                  1 Reply Last reply
                  1
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Then you have to go to the "Run" part of the Project panel. Once there, modify the PATH environment variable and prepend the folder where the ssh.dll file can be found. Do NOT do it system wide.

                    Other solution is to copy the ssh.dll in the build folder of your application.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    2
                    • MrErfanM Offline
                      MrErfanM Offline
                      MrErfan
                      wrote on last edited by
                      #10

                      Thank you, the problem has been resolved.

                      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