Could you provide a 10-20 line (nearly) compilable illustrative example of what you are trying to attempt.
I'm using GCC 3.3.1 and my attempt to recreate your issue failed, since the friend function worked fine in my toy program.
In the absence of such an example, I suspect that your problem is that you are not forward declaring your function before declaring it a friend in your class.
Thanks, --Eljay