check the signature of your polar function and the parameters you are passing to the polar function. They doesn't match and there is no suitable overloaded function to call.
Thx. I thought that it was an linking error.
I have changed one line to :
const complex<double> rot=polar(1.0, 2.0*M_PI*t);//e^{2 \pi i t}
Compile with simple :
g++ h.cpp -Wall
and run
./a.out >h.pgm
It works.