tl;dr: Drop the namespace from before the function name.
I ran into the same issue. I had some source that compiled using MS Visual Studio but using g++ in Linux it gave me:
... error: explicit qualification in declaration of '...
It appears that this error occurs when the implementation is already inside namespace foospace {...} and the implementation gives the namespace again int foospace::barfunction(int blah){return 17;}.
Basically, if the implementation (the code in you .cpp file) is already inside namespace foospace {...} then remove foospace:: from the function definition.