Я пытаюсь «создать» проект, который у меня есть в C ++, но я получаю несколько сообщений об ошибках, в которых говорится, что некоторые члены глобального пространства имен отсутствуют.
Я использую MacOS Mojave 10.14.6 XCode-версия10.3 и мой код на C ++ 11.
Я использовал этот код до того, как обновил свою ОС до Mojave, и он работал отлично.Я попытался удалить и переустановить инструменты командной строки (включая установку пакетов внутри), но все равно получаю те же самые ошибки.
Путь к этим инструментам на моем компьютере: / Library / Developer / CommandLineTools
Вот сообщение об ошибке, которое я получаю:
/usr/bin/clang++ -std=c++11 -c -o sources/algorithmsData.o sources/algorithmsData.cpp
In file included from sources/algorithmsData.cpp:3:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/random:1638:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error: no
member named 'signbit' in the global namespace
using ::signbit;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error: no
member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:315:9: error: no
member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note:
'finite' declared here
extern int finite(double)
^
In file included from sources/algorithmsData.cpp:3:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/random:1638:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:316:9: error: no
member named 'isinf' in the global namespace
using ::isinf;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:317:9: error: no
member named 'isnan' in the global namespace
using ::isnan;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:318:9: error: no
member named 'isnormal' in the global namespace
using ::isnormal;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:319:7: error: no
member named 'isgreater' in the global namespace; did you mean
'::std::greater'?
using ::isgreater;
^~
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:720:29: note:
'::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
^
In file included from sources/algorithmsData.cpp:3:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/random:1638:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:320:7: error: no
member named 'isgreaterequal' in the global namespace; did you mean
'::std::greater_equal'?
using ::isgreaterequal;
^~
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:749:29: note:
'::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
^
In file included from sources/algorithmsData.cpp:3:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/random:1638:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:321:9: error: no
member named 'isless' in the global namespace
using ::isless;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:322:9: error: no
member named 'islessequal' in the global namespace
using ::islessequal;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:323:9: error: no
member named 'islessgreater' in the global namespace
using ::islessgreater;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:324:9: error: no
member named 'isunordered' in the global namespace
using ::isunordered;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error: no
member named 'isunordered' in the global namespace
using ::isunordered;
~~^
13 errors generated.
make: *** [sources/algorithmsData.o] Error 1