I’ve got a project that uses boost library compiled and installed on my macOS build machine using conan2 under CMake.
I’ve managed to reproduce the problem using the following minimal code :
#include <boost/algorithm/string.hpp>
#include <iostream>
#include <string>
int main() {
std::string str = "Hello";
boost::to_upper(str);
std::cout << str << std::endl;
return 0;
}
When running cmake --build .
I get the following error :
In file included from /Users/user/Developer/BoostExampleConan/main.cpp:1:
In file included from /Users/user/.conan2/p/b/boost694222cbc5cd8/p/include/boost/algorithm/string.hpp:18:
In file included from /Users/user/.conan2/p/b/boost694222cbc5cd8/p/include/boost/algorithm/string/std_containers_traits.hpp:18:
In file included from /Users/user/.conan2/p/b/boost694222cbc5cd8/p/include/boost/config.hpp:44:
/Users/user/.conan2/p/b/boost694222cbc5cd8/p/include/boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
26 | # include <cstddef>
Any ideas how to resolve it? do I need to set different compiler ?
Thanks
1