Unresolved while linking function .. ERROR!

Hello!

| Welcome to ROOT 6.02/08 root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for macosx64 |
| From tag v6-02-08, 13 April 2015 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

I am a beginner in learning ROOT and I am trying to execute some examples from the tutorial :

"An example of an analysis script: we read the data from an ASCII file basic.dat; generate a few histograms; and save them in the file basic.root. "

I get the data file and the code file ,put them inside the root folder to load them… and I get this error :

root [0] .L basic.cpp fatal error: file '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale' modified since it was first processed root [1] basic() input_line_35:2:3: error: use of undeclared identifier 'basic' (basic()) ^ root [2] .L basic.cpp root [3] basic() IncrementalExecutor::executeFunction: symbol '_ZNKSt3__18ios_base4goodEv' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__13maxIlEERKT_S3_S3_' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__13minImEERKT_S3_S3_' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__14moveIRPFiP7__sFILEEEEONS_16remove_referenceIT_E4typeEOS7_' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__17forwardIP7__sFILEEEOT_RNS_16remove_referenceIS3_E4typeE' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__17forwardIPFiP7__sFILEEEEOT_RNS_16remove_referenceIS5_E4typeE' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__18ios_base8setstateEj' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__19has_facetINS_7codecvtIcc11__mbstate_tEEEEbRKNS_6localeE' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__19use_facetINS_7codecvtIcc11__mbstate_tEEEERKT_RKNS_6localeE' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! IncrementalExecutor::executeFunction: symbol '_ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc' unresolved while linking function'_Z15__cling_Un1Qu32Pv'! root [4]

I am using OS X Yosemite 10.10.4
any help will be appreciated :slight_smile:
basic.dat (27.4 KB)
basic.cpp (1.23 KB)

Try the attached file (".L basic.cpp++").
basic.cpp (1.26 KB)

thanks for the replay, but the same error is still appearing !!
I am wondering if the problem with the version that I used ? or the code ? or from the data file ??
any help please !

Well, make sure that you have updated your Xcode and then try a newer ROOT (6.02/12 or 6.04/02).

yes that solve it , I get the root (6.04/02) … thank you