which error is it - a semantic error or a link error?
We can reproduce your error using this C++ code:

intmain() {
    return 0;
}


The following error is returned during compile time:

error: ISO C++ forbids declaration of ‘intmain’ with no type [-fpermissive]


Every function in C/C++ has to have a type. In this sense, it's a type error, which falls in the category of (static) semantic errors. On the other hand, your error is caused by a typo. This sort of error is considered a lexical error, which falls under syntax errors.

There is a lot of discussion whether certain errors are syntactical or static semantic. My opinion is this case is that the error is lexical, considering the cause.