2

During a build process (unit tests) there are a bunch of errors like:
"error: no member named 'xxx' in the global namespace using::xxx;" ('xxx' is a type, e.g. uint8_t).

DETAILS:

  • in case if I include only <boost/test/unit_test.hpp>, the source of error is in the file /Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint
  • in case if I include <boost/cstdint.hpp> before , the source of error is in the file /usr/local/include/boost/cstdint.hpp

ENVIRONMENT:

  • macOS Mojave
  • compiler: clang
  • CXX_STANDARD: 11 / 14
  • boost v.1.67.0_1 (installed using homebrew to default location - usr/local/Cellar/)

UPD: The same issue (with cstdint) happens with using Google Test (1.8.1)

olpo.graphy
  • 405
  • 8
  • 17

1 Answers1

1

After some time spent with this issue, I reinstall the operating system. Now I have Boost and Google Test working in parallel.

I can't be sure for 100% about the reason for the issue but I compared the usr/local/include folder before and after reinstallation. I found that there are many .cpp and .h files and cstdint.hpp is among them. Now usr/local/include folder contains only symbolic links for boost, gmock and gtest.

olpo.graphy
  • 405
  • 8
  • 17