Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[SOLVED] Porting simple visual c++ project to Qt



  • Hi,
    iv'e started a project in Qt which uses libssh , i compiled the lib using microsoft visual studio 12 2013 ultimate .
    when compiling libssh i got the ssh.lib and ssh.dll files , i tried linking them and running them in qt but didn't work out :
    http://qt-project.org/forums/viewthread/46493/ .

    now in order to not waste more time looking for answers , i continued working with visual c++ , i wrote a simple main that uses libssh code and it works , i can connect and login to my ssh server .

    my question now , because now i reached the point where i need a cross plateform gui , how can i move my project from visual c++ to qt ? please tell the simplest way to link my ssh.lib and ssh.dll to my project .

    becuase as the link above i tried linking only the ssh.lib before but didn't work out .


  • Moderators

    From your other thread I gather that you have succesfully linked libssh library. So that is not where the problem lies.

    I have 2 suggestions:

    Make sure you copy ssh.dll to C:\Users\saeed\build-ACS_tool-Desktop_Qt_5_3_MSVC2013_OpenGL_32bit-Debug\debug This is very likely the reason why you are getting an error

    Run your application in debug mode to see where the application fails



  • [quote author="sierdzio" date="1408782353"]

    Make sure you copy ssh.dll to C:\Users\saeed\build-ACS_tool-Desktop_Qt_5_3_MSVC2013_OpenGL_32bit-Debug\debug This is very likely the reason why you are getting an error

    [/quote]

    the ssh.dll is there , and can't run in debug mode it just runs and immediately crashes .
    [quote]
    Debugging starts
    Debugging has finished
    [/quote]

    !http://i58.tinypic.com/25qr51e.png(Dll)!


  • Moderators

    Ok, then try something else: run the application from Windows by double clicking on the .exe It will probably complain about missing dlls first, and then start complaining about Qt dlls. Copy those missing libraries (no need to copy Qt stuff at this point), then run it again from Qt Creator.



  • ok fixed a couple of missing dlls by adding to the system environment path variable , but now im stuck with MSVCR100D.dll missing , i googled and they said to install visuacl c++ redistributables , but didn't work .
    any ideas ?


  • Lifetime Qt Champion

    Hi,

    Just to be sure, did you install the recommended VS2010 runtime libraries ?



  • [quote author="SGaist" date="1408823362"]Hi,

    Just to be sure, did you install the recommended VS2010 runtime libraries ?
    [/quote]

    I've installed :
    qt-opensource-windows-x86-msvc2013_opengl-5.3.1
    microsoft visual studio 12 2013
    windows kits 8.1
    Visual C++ Redistributable Packages for Visual Studio 2013


  • Lifetime Qt Champion

    Then you are missing the VS2010 redistributable package



  • Actually i just checked and i have them installed :
    !http://i61.tinypic.com/au9kt5.png(2010vs)!



  • Ok fixed it i've had enough trying to install it in a "fromal" way , i just went to http://www.dll-files.com/ downloaded the .dll copied it to c:/windows/system32 .
    lesson learned :
    hate windows more people .


Log in to reply