Problems with Xcode

Hi everyone,
I Have a MacBook Air with macOS high sierra 10.13.1. and Xcode 8.0.

I have problems when I try to compile a program in this way
.L Program.cpp++

and the error given by the terminal is as follows:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/cmath:683:46: error:
declaration conflicts with target of using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXC…
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:707:46: note:
target of using declaration
inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXC…
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/cmath:679:9: note:
using declaration
using ::acos;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/cmath:684:46: error:
declaration conflicts with target of using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) …
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:708:46: note:
target of using declaration
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) …
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/cmath:679:9: note:
using declaration
using ::acos;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/cmath:690:1: error:
declaration conflicts with target of using declaration already in scope
acos(_A1 __lcpp_x) _NOEXCEPT {return acos((double)__lcpp_x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:714:1: note:
target of using declaration
acos(_A1 __lcpp_x) _NOEXCEPT {return ::acos((double)__lcpp_x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/cmath:679:9: note:
using declaration
using ::acos;

I had the latest version of XCode but gave other errors compiling and on the forum I read that version 8 worked better and then I downgraded

can someone help me understand how to solve this problem?
Thank you

ROOT Version: 6.08/04
Platform: Not Provided
Compiler: Not Provided


have you done:

 xcode-select --install

?

I did it now, and this is the answer from the terminal

xcode-select: error: command line tools are already installed, use “Software Update” to install updates

If you start the Xcode app what does it tells you ?

If you mean opening it from the terminal, it says nothing.

I mean from the Apps … with the Xcode icon …

Does not say anything anyway, I see the classic opening of Xcode

can you post the file having the problem ? ie Program.cpp … ?

of course, but I have already verified that the problem does not depend on the file but it is always present

#if !defined(CINT) || defined(MAKECINT)
#include <Riostream.h>
#endif

void ioexample(const char *fimpName, const char *foupName){
ifstream in(fimpName);
if(!in){
cout<<"Il file “<<fimpName<<” non esiste “<<endl;
return;
}
ofstream fout(foupName);
int number1,number2;
int count = 0;
while((in>>number1>>number2)){
count++; // incremento del contatore
// scrittura su standard output
cout<<count<<”) ";
cout<<"Numero 1 = “<<number1<<”; Numero2 = “<<number2<<endl;
// scrittura su file
fout<<count<<” ";
fout<<"Numero 1 = “<<number1<<”; Numero2 = "<<number2<<endl;
}
in.close();
fout.close();
}

What do you mean ? even if you type a simple root command at the ROOT prompt you get such problem ?

no, only when I compile any program

It seems there is an issue with you environment. May be @amadio knows.
Is your Xcode up to date by the way ?

I had the latest version but I displayed other strange compilation errors of this kind, (different from what we are talking about) so I read on the forum that Xcode 8 did not give that kind of errors and I downgraded.

ROOT is somewhat sensitive to the version of XCode. So if you updated OS X and/orXCode, I recommend that you update ROOT to the latest version as well.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.