I just chased down a problem that was making me crazy.
I had a class defined in an external library, but when I tried to make a function that would accept it as an argument, I would get the 'myTypeName was not declared in this scope' error.
The problem was, I was including my header file with "myType.h" instead of <myType.h>.
The Arduino pre-processor seems to use the first "" included header file as a place to drop all the forward reference prototypes it makes when it turns your sketch.pde file into a sketch.cpp file.
Since my include happened AFTER the first #include "header.h", the prototypes that referenced myType happened prior to the include where they were defined.
Changing my include to <myType.h> and moving it up so it occurred prior to any "otherheader.h" style includes fixed things right up.
Critical to debugging this was setting build.path=/tmp/build and build.verbose=true so i could see what was going on.
I couldn't find this referenced on the internets, so here you go!
-Scott