dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2018
    Posts
    3

    boost issue when compiling a 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
    Code:
    In file included from src/txdb-leveldb.cpp:9:
    In file included from /usr/local/opt/boost@1.60/include/boost/filesystem.hpp:16:
    /usr/local/opt/boost@1.60/include/boost/filesystem/path.hpp:153:55: error: no member named 'move' in namespace 'std'
    path(path&& p) BOOST_NOEXCEPT { m_pathname = std::move(p.m_pathname); }
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/path.hpp:155:27: error: no member named 'move' in namespace 'std'
    { m_pathname = std::move(p.m_pathname); return *this; }
    ~~~~~^
    In file included from src/txdb-leveldb.cpp:9:
    In file included from /usr/local/opt/boost@1.60/include/boost/filesystem.hpp:17:
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:281:22: error: no member named 'move' in namespace 'std'
    m_value = std::move(rhs.m_value);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:282:22: error: no member named 'move' in namespace 'std'
    m_perms = std::move(rhs.m_perms);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:286:22: error: no member named 'move' in namespace 'std'
    m_value = std::move(rhs.m_value);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:287:22: error: no member named 'move' in namespace 'std'
    m_perms = std::move(rhs.m_perms);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:775:19: error: no member named 'move' in namespace 'std'
    m_path = std::move(rhs.m_path);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:776:21: error: no member named 'move' in namespace 'std'
    m_status = std::move(rhs.m_status);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:777:29: error: no member named 'move' in namespace 'std'
    m_symlink_status = std::move(rhs.m_symlink_status);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:781:19: error: no member named 'move' in namespace 'std'
    m_path = std::move(rhs.m_path);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:782:21: error: no member named 'move' in namespace 'std'
    m_status = std::move(rhs.m_status);
    ~~~~~^
    /usr/local/opt/boost@1.60/include/boost/filesystem/operations.hpp:783:29: error: no member named 'move' in namespace 'std'
    m_symlink_status = std::move(rhs.m_symlink_status);
    ~~~~~^
    In file included from src/txdb-leveldb.cpp:17:
    In file included from src/kernel.h:7:
    In file included from src/main.h:14:
    In file included from src/core.h:9:
    In file included from src/serialize.h:23:
    In file included from src/allocators.h:11:
    In file included from /usr/local/opt/boost@1.60/include/boost/thread/mutex.hpp:16:
    In file included from /usr/local/opt/boost@1.60/include/boost/thread/pthread/mutex.hpp:16:
    In file included from /usr/local/opt/boost@1.60/include/boost/thread/lock_types.hpp:11:
    /usr/local/opt/boost@1.60/include/boost/thread/detail/move.hpp:31:10: fatal error: 'type_traits' file not found
    #include <type_traits>
    ^~~~~~~~~~~~~
    13 errors generated.
    make[1]: *** [build/txdb-leveldb.o] Error 1
    make: *** [release] Error 2
    09:02:34: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project flapx-qt (kit: QT 5.11)
    When executing step "Make"
    if anyone has any advice please let me know thanks

  2. #2
    Join Date
    Feb 2017
    Posts
    296

    Re: boost issue when compiling a project

    It seems like std::move is missing. That's a C++ 11 function,

    http://en.cppreference.com/w/cpp/utility/move

    I guess you must either use a compiler with C++ 11 support or a pre-11 version of Boost.

  3. #3
    Join Date
    May 2018
    Posts
    3

    Re: boost issue when compiling a project

    Quote Originally Posted by wolle View Post
    It seems like std::move is missing. That's a C++ 11 function,

    http://en.cppreference.com/w/cpp/utility/move

    I guess you must either use a compiler with C++ 11 support or a pre-11 version of Boost.
    while i waited for a reply here i posted in another forum asking for help and they said my compiler is out of date, if i go to the terminal on my mac and do gcc --version i get 4.2.1 if i do clang --version i get 9.1.0, i downloaded and installed a newer gcc version using homebrew but when i point qt to where it is i get this error message
    C and C++ compiler paths differ. C compiler may not work.
    and i get the boost error again, if i change both compilers to clang i get the boost error, so at this point i do not know how to fix it and i dont think down grading boost will fix it as the code would still look for the std name space

  4. #4
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,274

    Re: boost issue when compiling a project

    As I don't use OS x or gcc, I can't help with specifics. However the problem is indeed that your original compiler is out of date and doesn't support c++11, much less the current c++17 standard. Updating to the latest version of gcc should solve this (you have installed both the c++ and c latest gnu compilers?). However I understand that you have to specify the version of c++ to use as a command line option with gcc using the -std= option. See https://gcc.gnu.org/projects/cxx-status.html
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.7.4)

  5. #5
    Join Date
    May 2018
    Posts
    3

    Re: boost issue when compiling a project

    Quote Originally Posted by 2kaud View Post
    As I don't use OS x or gcc, I can't help with specifics. However the problem is indeed that your original compiler is out of date and doesn't support c++11, much less the current c++17 standard. Updating to the latest version of gcc should solve this (you have installed both the c++ and c latest gnu compilers?). However I understand that you have to specify the version of c++ to use as a command line option with gcc using the -std= option. See https://gcc.gnu.org/projects/cxx-status.html
    What would i search for to install a new c compiler?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.