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. [SOLVED] Qt Creator on OS X cannot find armadillo
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qt Creator on OS X cannot find armadillo

Scheduled Pinned Locked Moved Qt Creator and other tools
7 Posts 4 Posters 3.7k Views 1 Watching
  • 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
    mariusmeyer
    wrote on last edited by
    #1

    Qt Creator 3.1.1 cannot find armadillo under OS X 10.9.3. I have installed armadillo 4.300.5 using the cmake install, and I have armadillo entries under /usr/include and libarmadillo in /usr/lib. When typing #include <a, Qt Creator suggests armadillo for autocomplete, meaning that Qt Creator indeed finds the lib. But trying to compile the program only gives the error
    'armadillo' file not found
    with a red ! on the #include line. Here is a MWE:
    @
    #include <armadillo>

    using namespace std;

    int main()
    {
    arma::mat A;
    return 0;
    }
    @

    with .pro-file
    @
    TEMPLATE = app
    CONFIG += console
    CONFIG -= app_bundle
    CONFIG -= qt

    SOURCES += main.cpp

    LIBS += -larmadillo
    @

    I am using the default Desktop qt clang 64bit compiler option.
    Thanks for any input!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Did you try adding /usr/lib to the list of known folder ?

      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
      0
      • M Offline
        M Offline
        mariusmeyer
        wrote on last edited by
        #3

        Where is that list located? I cannot find it in the Preferences of Qt Creator.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          For you project:

          @LIBS += -L/usr/lib@

          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
          0
          • M Offline
            M Offline
            mariusmeyer
            wrote on last edited by
            #5

            Yes, I tried both the line you posted and also
            @LIBS += -L/usr/lib -larmadillo@
            I have also tried to right-click the project and select "Add Library...", but
            I get the same error message.

            EDIT:
            If I do
            @clang -O3 -o test -larmadillo main.cpp@
            in the terminal it compiles just fine.

            EDIT2:
            It seems I needed to add the includes directory,
            @INCLUDEPATH += /usr/include@
            Now it works =)

            1 Reply Last reply
            0
            • M Offline
              M Offline
              muawijhe
              wrote on last edited by
              #6

              This is not yet solved...
              I'm running on Ubuntu 14.04 with Qt Creator 3.1.0 (opensource)

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rforcen
                wrote on last edited by
                #7

                on macOs add this to .pro

                install armadillo: brew install armadillo

                brew list armadillo

                INCLUDEPATH += /usr/local/Cellar/armadillo/8.200.2/include/
                LIBS += -L/usr/local/Cellar/armadillo/8.200.2/lib/ -larmadillo

                1 Reply Last reply
                1

                • Login

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