Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Osx include files installed with brew
Qt 6.11 is out! See what's new in the release blog

Osx include files installed with brew

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 2.7k 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.
  • X Offline
    X Offline
    xhallix
    wrote on last edited by xhallix
    #1

    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?

    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 and libssh.dylib in /usr/local/lib/

    thanks

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xhallix
      wrote on last edited by
      #2

      Ok adding following did the trick for me

      INCLUDEPATH += /usr/local/include/
      LIBS += -L /usr/local/lib/ -lssh 
      
      1 Reply Last reply
      1
      • R Offline
        R Offline
        rforcen
        wrote on last edited by rforcen
        #3

        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 -lgmp

        or 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}

        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