1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

fatal error: boost/ detail/endian.hpp: No such file or directory #include <boost/detail/endian.hpp>

Last updated at Posted at 2020-10-15

boost 1.73にしたら、プログラムが表題のエラーを吐いてコンパイルできなくなったので、治し方の備忘録(ただの情報元のコピーですが、毎回その情報元を探すのに苦労するので)。

以下の2つは、boost 1.73で削除されたとのこと。(1.72までは存在する)

https://www.boost.org/doc/libs/1_73_0/boost/predef/detail/endian_compat.h
https://www.boost.org/doc/libs/1_73_0/boost/detail/endian.hpp

1.73以降は、<boost/detail/endian.hpp>の代わりに以下を使う。

//#include <boost/detail/endian.hpp>
# include <boost/predef/other/endian.h>

さらに、BOOST_XXX_ENDIANBOOST_ENDIAN_XXX_BYTEに書き換える。

//#if defined(BOOST_BIG_ENDIAN)
# if defined(BOOST_ENDIAN_BIG_BYTE)
...
//#elif defined(BOOST_LITTLE_ENDIAN)
# elif defined(BOOST_ENDIAN_LITTLE_BYTE)

これでコンパイル通るようになりました。

情報元:
https://github.com/boostorg/endian/issues/45

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?