main function is not defined
Point 1.

Your #endif is at the end of the block of code. Essentially you are telling the compiler not to compile anything if PID_H is NOT defined.

Try using

#ifndef PID_H


instead of

#ifdef PID_H


Point 2.

You can't declare PIcal() inside main()!
Use something like...

...

float PIcal (float setpoint, float actual_voltage) ;

void main(float output)
{
     float pre_error = 0.0 ;
     float integral = 0.0 ;
     float error ;
     ...