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)

Problem in use libssh (application crashed)

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 3.1k 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.
  • M Offline
    M Offline
    MrErfan
    wrote on 8 Sept 2017, 20:03 last edited by MrErfan 9 Sept 2017, 11:25
    #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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Sept 2017, 21:52 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
      • M Offline
        M Offline
        MrErfan
        wrote on 9 Sept 2017, 09:18 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
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 9 Sept 2017, 10:36 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
          • M Offline
            M Offline
            MrErfan
            wrote on 9 Sept 2017, 11:23 last edited by
            #5

            No, I downloaded the msvc version

            M 1 Reply Last reply 9 Sept 2017, 11:26
            0
            • M MrErfan
              9 Sept 2017, 11:23

              No, I downloaded the msvc version

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 9 Sept 2017, 11:26 last edited by
              #6

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

              1 Reply Last reply
              1
              • M Offline
                M Offline
                MrErfan
                wrote on 9 Sept 2017, 11:30 last edited by
                #7

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

                M 1 Reply Last reply 9 Sept 2017, 11:33
                1
                • M MrErfan
                  9 Sept 2017, 11:30

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

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 9 Sept 2017, 11:33 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
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 9 Sept 2017, 19:48 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
                    • M Offline
                      M Offline
                      MrErfan
                      wrote on 9 Sept 2017, 19:57 last edited by
                      #10

                      Thank you, the problem has been resolved.

                      1 Reply Last reply
                      0

                      3/10

                      9 Sept 2017, 09:18

                      topic:navigator.unread, 7
                      • Login

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