Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt and Boost (installed through Homebrew) result in Qt compile errors

Qt and Boost (installed through Homebrew) result in Qt compile errors

Scheduled Pinned Locked Moved Solved General and Desktop
boost
3 Posts 2 Posters 1.3k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on 6 Dec 2015, 22:15 last edited by
    #1

    I am in the exact situation described in this question (http://stackoverflow.com/questions/23134937/qt-creator-on-mac-and-boost-libraries) but the accepted answer is not working for me. I've searched around and tried all the suggestions I've found but I still end up with errors

    Environment:

    • OSX 10.9.5
    • Qt 5.5.1 - Qt Creator 3.5.1 - installed using the Qt
      installer
    • Boost 1.59.0 – installed through Homebrew
    • Am able to compile and run Qt apps

    After creating a new Qt test application, when I add the Boost information to the .pro file (shown below) as described in the question linked above, I end up with very confusing compile errors within the Qt classes. I don't get it. Does anyone understand the conflict and know how to resolve this – I've been at it for hours now.

    enter image description here

    QT   += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = audiowaveform_test
    TEMPLATE = app
    SOURCES += main.cpp\
            mainwindow.cpp
    
    HEADERS  += mainwindow.h
    FORMS    += mainwindow.ui
    
    macx {
        QMAKE_CXXFLAGS += -std=c++11
    
        _BOOST_PATH = /usr/local/Cellar/boost/1.59.0
        INCLUDEPATH += "$${_BOOST_PATH}/include/"
        LIBS += -L$${_BOOST_PATH}/lib
        ## Use only one of these:
        LIBS += -lboost_chrono-mt -lboost_system # using dynamic lib (not sure if you need that "-mt" at the end or not)
        #LIBS += $${_BOOST_PATH}/lib/libboost_chrono-mt.a # using static lib
    }
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 6 Dec 2015, 22:48 last edited by
      #2

      Hi,

      Use CONFIG += c++11 to activate C++11 properly, there's the standard you want to use as well as linking to the correct library.

      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 6 Dec 2015, 23:00
      0
      • S SGaist
        6 Dec 2015, 22:48

        Hi,

        Use CONFIG += c++11 to activate C++11 properly, there's the standard you want to use as well as linking to the correct library.

        ? Offline
        ? Offline
        A Former User
        wrote on 6 Dec 2015, 23:00 last edited by
        #3

        @SGaist

        heh – I must be receiving your comments telepathically – I just "discovered" that a few minutes before seeing your comment.

        thanks!

        1 Reply Last reply
        0

        2/3

        6 Dec 2015, 22:48

        • Login

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