Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Creator on mac osx: c++ headers not being found / boost/shared_ptr.hpp: No such file or directory
Forum Updated to NodeBB v4.3 + New Features

Qt Creator on mac osx: c++ headers not being found / boost/shared_ptr.hpp: No such file or directory

Scheduled Pinned Locked Moved Installation and Deployment
19 Posts 2 Posters 15.4k 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.
  • A Offline
    A Offline
    ambershark
    wrote on last edited by
    #10

    This is really weird. Let's try removing Qt from it and just do:

    @
    // main.cpp

    #include <boost/shared_ptr.hpp>

    int main(int argc, char *argv[])
    {
    return 0;
    }
    @

    Then to build (on command line):

    @
    g++ -I/usr/local/include -o main main.cpp
    @

    If that has the problem them we can try to figure it out from there, if not it's something Qt is doing and we can look further into it.

    My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andrinbertschi
      wrote on last edited by
      #11

      It's weird indeed. The compilation by command line works just fine.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ambershark
        wrote on last edited by
        #12

        Ok, lets make it into a Qt project and see if that works. Assuming you have an empty directory with just main.cpp in it, do

        @
        qmake -project
        @

        Then edit the resulting pro file and add:

        @
        INCLUDEPATH += /usr/local/include
        @

        Then try:

        @
        qmake
        make
        @

        See if that builds.

        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andrinbertschi
          wrote on last edited by
          #13

          make shows me
          @
          make: Nothing to be done for `first'.
          @

          Although the code was never compiled.

          Generated Makefile: https://gist.github.com/abertschi/d77626909a2f0a8d6912

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andrinbertschi
            wrote on last edited by
            #14

            Just to keep you on track.
            The next things I'm going to try are:

            • Download Qt 5.3.1 and try to compile with boost headers

            • Try to find an older Sailfish Qt release and try to compile with boost headers

            @ambershark, I really appreciate your help, thanks a lot. If you have any other idea please let me know.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              ambershark
              wrote on last edited by
              #15

              Let me see the generated pro file, or you can just try:

              @
              make distclean
              qmake
              make
              @

              If distclean doesn't cause a recompile, then

              @
              rm *.o
              rm main
              qmake
              make
              @

              That should force the compile and we'll see what happens.

              And boost should work even without compiling it into qt, but adding it to qt would be the better approach. This guarantees compatibility.

              My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andrinbertschi
                wrote on last edited by
                #16

                @make distclean @

                or

                @rm *.o @

                don't help. No out files were generated.

                @ make: Nothing to be done for `first'.@

                All I get is the above message and the Makefile:

                @
                drwxr-xr-x 5 abertschi staff 170 26 Jul 02:08 .
                drwxr-xr-x 5 abertschi staff 170 26 Jul 01:35 ..
                -rw-r--r-- 1 abertschi staff 4891 26 Jul 02:08 Makefile
                -rw-r--r-- 1 abertschi staff 83 26 Jul 01:29 main.cpp
                -rw-r--r-- 1 abertschi staff 302 26 Jul 02:08 qt-proj.pro
                @

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  ambershark
                  wrote on last edited by
                  #17

                  Let me see that qt-proj.pro file...

                  My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andrinbertschi
                    wrote on last edited by
                    #18

                    @######################################################################

                    Automatically generated by qmake (2.01a) Sa. Jul 26 01:29:05 2014

                    ######################################################################

                    TEMPLATE = subdirs

                    SOURCES += main.cpp

                    Directories

                    INCLUDEPATH += /usr/local/include
                    @

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      ambershark
                      wrote on last edited by
                      #19

                      Ok there's the problem. It is using a subdirs template. Not sure why it would have generated that.

                      Make a new pro file with this:

                      @
                      TEMPLATE = app
                      TARGET = main
                      INCLUDEPATH += /usr/local/include .
                      QT += core

                      SOURCES += main.cpp
                      @

                      Then try building.

                      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                      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