Osx include files installed with brew
-
I want to use
libssh
in myQT
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?edit
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
andlibssh.dylib
in/usr/local/lib/
thanks
-
i use this .pro snippet (change gmp w/ssh) or what so ever.
GMP=/usr/local/Cellar/gmp/6.2.0 # GMP brew location
INCLUDEPATH += $${GMP}/include
macx: LIBS += -L$${GMP}/lib -lgmpor in a more general form:
lib=gmp
lib_loc=$$system(/usr/local/bin/brew --prefix $${lib})
INCLUDEPATH += $${lib_loc}/include
macx: LIBS += -L$${lib_loc}/lib -l$${lib}