2017-01-04 6 views
1

私はCrow RESTful APIフィールド「buffer_は」incoplete型「ブーストを::配列<文字、4096ul>」は

から、単純なRESTのAPIの例をコンパイルしようとしているが、私はすべての作るか、またはちょうど私のmakeを実行したときに次のエラーが発生する

[ 55%] Building CXX object 

examples/CMakeFiles/example_with_all.dir/example_with_all.cpp.o 
In file included from /home/hinach4n/Project-Alpha/libs/crow/examples/example_with_all.cpp:1:0: 
/home/hinach4n/Project-Alpha/libs/crow/examples/../amalgamate/crow_all.h:5026:42: error: field ‘buffer_’ has incomplete type ‘boost::array<char, 4096ul>’ 
       boost::array<char, 4096> buffer_; 
             ^
In file included from /usr/include/boost/asio/buffer.hpp:23:0, 
       from /usr/include/boost/asio/detail/reactive_socket_service.hpp:22, 
       from /usr/include/boost/asio/datagram_socket_service.hpp:30, 
       from /usr/include/boost/asio/basic_datagram_socket.hpp:21, 
       from /usr/include/boost/asio.hpp:21, 
       from /home/hinach4n/Project-Alpha/libs/crow/examples/../amalgamate/crow_all.h:242, 
       from /home/hinach4n/Project-Alpha/libs/crow/examples/example_with_all.cpp:1: 
/usr/include/boost/asio/detail/array_fwd.hpp:23:7: note: declaration of ‘class boost::array<char, 4096ul>’ 
class array; 
    ^
examples/CMakeFiles/example_with_all.dir/build.make:62: recipe for target 'examples/CMakeFiles/example_with_all.dir/example_with_all.cpp.o' failed 
make[2]: *** [examples/CMakeFiles/example_with_all.dir/example_with_all.cpp.o] Error 1 
CMakeFiles/Makefile2:321: recipe for target 'examples/CMakeFiles/example_with_all.dir/all' failed 
make[1]: *** [examples/CMakeFiles/example_with_all.dir/all] Error 2 
Makefile:94: recipe for target 'all' failed 
make: *** [all] Error 2 

そして、私はヘッダーファイルを見てきましたが、問題の内容を理解できないようです。ご協力いただきありがとうございます!

+0

私のPC上のその建物の上級者(ブースト1.60、gcc 6.2.1、cmake 3.6.2)。 – vordhosbn

+0

mhm imはboost 1.58を使用し、example_with_all.cppは協力したくないファイルです。他のファイルのコンパイルと作業 –

答えて

3

このエラーメッセージは、の定義boost::array<>のヘッダーファイルに含まれていないことを示しています。

可能修正:crow_all.hの先頭に#include <boost/array.hpp>を追加します。

関連する問題