The PHP Component runs inside a function. So it runs in a local scope.
Functions are always global (they have no scope). Even if a function is declared in another function, it still becomes global. Same goes for classes and their methods. Only variable references have scope and thus would be effected by the com_php component.
In other words, if you couldn't call a function, it means it has not been declared. So likely the file paths you are using are not correct.
Since variables have scope, then variables declared outside com_php will have to be imported with the 'global' keyword. Joomla has JFactory for retrieving singletons in a way that is similar to using 'global' but without the 'global namespace pollution' that has gone out of style.
After reading my response, I don't think it was quite clear. To answer you last post directly, you do not have to go through all the functions and make them global. You just need to make sure you have the correct paths to include those files those functions are declared in. You also need to make sure the variables declared outside the PHP component are imported into the local scope.