You need to declare the variable in File2.cpp as an external. I suggest putting it in a header file and including that.
The reason for both of your errors, as far as I can see, is that the compiler can't find the variable. Separate source files (translation units) are compiled separately, so they can't share variables by default.
This declares an external integer variable called i externint i;
so the compiler accepts that it is then defined in another translation unit, and leaves it for the linker to put it all together.