Osx include files installed with brew

  • I want to use libssh in my QT project.

    I installed it with brew install libssh. Then I did #include <libssh/libssh.h> and trying to compile.
    However the file could not be found, so I guess I need to link to my brew path somehow.

    How can I include /usr/local/Cellar/libssh/0.7.5 into my project?

    http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html <- adding library in the creator does not work as nothing happens. Even including the full relative path does not work
    #include <../../usr/local/Cellar/libssh/0.7.5/include/libssh/libssh.h>

    for libssh I also have libssh.a and libssh.dylib in /usr/local/lib/


  • Ok adding following did the trick for me

    INCLUDEPATH += /usr/local/include/
    LIBS += -L /usr/local/lib/ -lssh 

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.