Cannot find function 'hello()'; falling back to .L

whenever i try to run a program for example a program name hello.C
error comes cannot find function ‘hello()’; falling back to .L
please help me with this

1 Like

Does your “hello.C” file contain:

void hello() {
  // ... calculate whatever is needed ...
}

no
actually i am new to root and i run its tutorial files but when i copy the complete program’s script and create a new file with different name it starts showing the error similar as above so i try to run a basic c++ program “hello” as it accept c++ language so it shows the same problem as above.
i am not getting how to run a user based program
please help me out

Usually, if you rename your ROOT script file, you will also want to rename the function inside (so that the name of the function is equal to the name of the file).

BTW. Do not call your function “main”, unless you really really really (notice the triple “really”) know what you are doing.

1 Like

{
cout << “tarun”<<endl;

return 0;
}
it works fine but when i use

#include
using namespace std;

int main()
{
cout << “tarun”<<endl;

return 0;
}
the error comes
the file name is tarun.C
cannot find function ‘tarun()’; falling back to .L
how can i run this program

ROOT Primer
ROOT User’s Guide

I will expand a bit on this:
Check section 3 of the ROOT Primer.

1 Like

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