Results 1 to 8 of 8

Thread: boost issue when compiling a qt project

  1. #1
    Join Date
    Aug 2016
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows

    Default boost issue when compiling a qt project

    hey everyone i am trying to compile a qt project on os x 10.13.4 and have tried boost 1.57, 1.59, 1.60 and 1.66, here is the error i need help with
    Qt Code:
    1. In file included from src/txdb-leveldb.cpp:9:
    2. In file included from /usr/local/opt/boost@1.60/include/boost/filesystem.hpp:16:
    3. /usr/local/opt/boost@1.60/include/boost/filesystem/path.hpp:153:55: error: no member named 'move' in namespace 'std'
    4. path(path&& p) BOOST_NOEXCEPT { m_pathname = std::move(p.m_pathname); }
    5. ~~~~~^
    6. /usr/local/opt/boost@1.60/include/boost/filesystem/path.hpp:155:27: error: no member named 'move' in namespace 'std'
    7. { m_pathname = std::move(p.m_pathname); return *this; }
    8. ~~~~~^
    9. In file included from src/txdb-leveldb.cpp:9:
    10. In file included from /usr/local/opt/boost@1.60/include/boost/filesystem.hpp:17:
    11. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:281:22: error: no member named 'move' in namespace 'std'
    12. m_value = std::move(rhs.m_value);
    13. ~~~~~^
    14. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:282:22: error: no member named 'move' in namespace 'std'
    15. m_perms = std::move(rhs.m_perms);
    16. ~~~~~^
    17. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:286:22: error: no member named 'move' in namespace 'std'
    18. m_value = std::move(rhs.m_value);
    19. ~~~~~^
    20. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:287:22: error: no member named 'move' in namespace 'std'
    21. m_perms = std::move(rhs.m_perms);
    22. ~~~~~^
    23. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:775:19: error: no member named 'move' in namespace 'std'
    24. m_path = std::move(rhs.m_path);
    25. ~~~~~^
    26. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:776:21: error: no member named 'move' in namespace 'std'
    27. m_status = std::move(rhs.m_status);
    28. ~~~~~^
    29. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:777:29: error: no member named 'move' in namespace 'std'
    30. m_symlink_status = std::move(rhs.m_symlink_status);
    31. ~~~~~^
    32. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:781:19: error: no member named 'move' in namespace 'std'
    33. m_path = std::move(rhs.m_path);
    34. ~~~~~^
    35. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:782:21: error: no member named 'move' in namespace 'std'
    36. m_status = std::move(rhs.m_status);
    37. ~~~~~^
    38. /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:783:29: error: no member named 'move' in namespace 'std'
    39. m_symlink_status = std::move(rhs.m_symlink_status);
    40. ~~~~~^
    41. In file included from src/txdb-leveldb.cpp:17:
    42. In file included from src/kernel.h:7:
    43. In file included from src/main.h:14:
    44. In file included from src/core.h:9:
    45. In file included from src/serialize.h:23:
    46. In file included from src/allocators.h:11:
    47. In file included from /usr/local/opt/boost@1.60/include/boost/thread/mutex.hpp:16:
    48. In file included from /usr/local/opt/boost@1.60/include/boost/thread/pthread/mutex.hpp:16:
    49. In file included from /usr/local/opt/boost@1.60/include/boost/thread/lock_types.hpp:11:
    50. /usr/local/opt/boost@1.60/include/boost/thread/detail/move.hpp:31:10: fatal error: 'type_traits' file not found
    51. #include <type_traits>
    52. ^~~~~~~~~~~~~
    53. 13 errors generated.
    54. make[1]: *** [build/txdb-leveldb.o] Error 1
    55. make: *** [release] Error 2
    56. 09:02:34: The process "/usr/bin/make" exited with code 2.
    57. Error while building/deploying project flapx-qt (kit: QT 5.11)
    58. When executing step "Make"
    To copy to clipboard, switch view to plain text mode 

    i have been told that my gcc is out of date but i do not know how to update it, if i do gcc --version i see 4.2.1 and if i do clang --version i see 9.1.0, i tried installing a updated version through homebrew but i cant get qt to use it and i still get the above error, i also tried switching it to clang for both c and c++ and got the same error above.

    if anyone has any more advice please let me know thanks

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: boost issue when compiling a qt project

    The move() template method didn't appear in the STL until C++-11. If your compiler isn't fully C++-11 compliant, then code using this won't compile. Your only solution is to try to find a C++-11 compiler -and- a C++-11 version of the STL.

    Note that you also need to set the C++ compiler flags -std=c++11, -stdlib=libc++, and -mmacosx-version-min=10.7
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Aug 2016
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: boost issue when compiling a qt project

    Quote Originally Posted by d_stranz View Post
    The move() template method didn't appear in the STL until C++-11. If your compiler isn't fully C++-11 compliant, then code using this won't compile. Your only solution is to try to find a C++-11 compiler -and- a C++-11 version of the STL.

    Note that you also need to set the C++ compiler flags -std=c++11, -stdlib=libc++, and -mmacosx-version-min=10.7
    is it possible to update the compiler?

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: boost issue when compiling a qt project

    I do Mac builds with gcc 4.2.1 and the compiler options I showed above. It is possible I don't exercise the same parts of boost or STL as your code (since templates aren't instantiated unless used), but I don't see errors related to boost or STL. You probably need to update your C++ Standard Library, not your compiler.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  5. #5
    Join Date
    Aug 2016
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: boost issue when compiling a qt project

    well i managed to get past all the errors and get the project compiled, i have now moved on to a new one and am getting the following errors, also thank you very much for all your help!
    src/qt/multisenddialog.cpp:76:25: error: member access into incomplete type 'QStyle'
    ui->message->style()->polish(ui->message);
    ^
    /usr/local/Qt-5.11.0/lib/QtWidgets.framework/Headers/qwidget.h:67:7: note: forward declaration of 'QStyle'
    class QStyle;
    ^
    src/qt/multisenddialog.cpp:90:29: error: member access into incomplete type 'QStyle'
    ui->message->style()->polish(ui->message);
    ^
    /usr/local/Qt-5.11.0/lib/QtWidgets.framework/Headers/qwidget.h:67:7: note: forward declaration of 'QStyle'
    class QStyle;
    ^
    src/qt/multisenddialog.cpp:105:29: error: member access into incomplete type 'QStyle'
    ui->message->style()->polish(ui->message);
    ^
    /usr/local/Qt-5.11.0/lib/QtWidgets.framework/Headers/qwidget.h:67:7: note: forward declaration of 'QStyle'
    class QStyle;
    ^
    src/qt/multisenddialog.cpp:113:29: error: member access into incomplete type 'QStyle'
    ui->message->style()->polish(ui->message);
    ^
    /usr/local/Qt-5.11.0/lib/QtWidgets.framework/Headers/qwidget.h:67:7: note: forward declaration of 'QStyle'
    class QStyle;
    ^
    src/qt/multisenddialog.cpp:125:25: error: member access into incomplete type 'QStyle'
    ui->message->style()->polish(ui->message);
    ^
    /usr/local/Qt-5.11.0/lib/QtWidgets.framework/Headers/qwidget.h:67:7: note: forward declaration of 'QStyle'
    class QStyle;
    ^
    src/qt/multisenddialog.cpp:188:25: error: member access into incomplete type 'QStyle'
    ui->message->style()->polish(ui->message);
    ^
    /usr/local/Qt-5.11.0/lib/QtWidgets.framework/Headers/qwidget.h:67:7: note: forward declaration of 'QStyle'
    class QStyle;
    ^
    src/qt/multisenddialog.cpp:204:25: error: member access into incomplete type 'QStyle'
    ui->message->style()->polish(ui->message);
    ^
    /usr/local/Qt-5.11.0/lib/QtWidgets.framework/Headers/qwidget.h:67:7: note: forward declaration of 'QStyle'
    class QStyle;
    ^
    7 errors generated.
    make: *** [build/multisenddialog.o] Error 1
    12:10:45: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project 1337-qt (kit: QT 5.11)
    When executing step "Make"
    12:10:45: Elapsed time: 00:09.

  6. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: boost issue when compiling a qt project

    You haven't #include-d the QStyle header file into whatever file it is you are trying to compile. Your "multisenddialog.h" or "ui_*.h" file forward-references the class with a statement like "class QStyle;", which tells the compiler that a class by that name exists, but until you include the actual QStyle header file, it has no idea what that class looks like.

    You need to spend a little time learning to use the toolchain you are trying to build your projects with.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  7. #7
    Join Date
    Aug 2016
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: boost issue when compiling a qt project

    Quote Originally Posted by d_stranz View Post
    You haven't #include-d the QStyle header file into whatever file it is you are trying to compile. Your "multisenddialog.h" or "ui_*.h" file forward-references the class with a statement like "class QStyle;", which tells the compiler that a class by that name exists, but until you include the actual QStyle header file, it has no idea what that class looks like.

    You need to spend a little time learning to use the toolchain you are trying to build your projects with.
    i dont code i only compile thats as far as my talents in this area go, i did not make this project i only compile it, it should be known i can compile this just fine on windows but not on mac

  8. #8
    Join Date
    Aug 2016
    Posts
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: boost issue when compiling a qt project

    i managed to get three different projects compiled however the version of openssl i used will cause issues down the road, so i tried using a different version and go this error

    https://pastebin.com/WF4KavFM

Similar Threads

  1. Help compiling this program in Qt using boost
    By SirJonas in forum Newbie
    Replies: 1
    Last Post: 7th November 2016, 16:42
  2. Building QT Console Project with Boost Python
    By PTVSnap in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2016, 11:13
  3. Compiling with boost.thread in Qt Creator 0.9
    By Envergure in forum Qt Programming
    Replies: 1
    Last Post: 28th November 2008, 07:10
  4. Compiling with boost.thread in Qt Creator 0.9
    By Envergure in forum Qt Programming
    Replies: 0
    Last Post: 28th November 2008, 03:00
  5. Error compiling Qt3 app with Boost signals support
    By stodge in forum Qt Programming
    Replies: 3
    Last Post: 3rd May 2007, 10:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.