qcc message error

Hi All,

I have compiled the folowing ANSI C code with qcc error messages. I will be appreciative for your help.

Thanks,

Zsolt

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<time.h>

*
*
*

int main() {
int l,j2,j1;
FILE *fp;

*
*
*

eqmt=0;
pa=0;
for(l=0;l<LMAXTS;l++) {
for(j2=0;j2<J2MAX;j2++) {
eqmt=eqmt+pow((u2j2t[l][j2]-saidatestel[l][j2]),2);
if(u2j2t[l][j2]>=0.5 && saidatestel[l][j2]>=0.5) {
pa=pa+1;
}
else {
if(u2j2t[l][j2]<0.5 && saidatestel[l][j2]<0.5) {
pa=pa+1;
}
}
}
}
pa=(pa100)/(lauxtsj2aux);
eqmt=eqmt/(lauxts*j2aux);
fp=fopen(S3,“a”);
*
*
*
return 0;

}

*
*
*

qcc error messages:
/tmp/AAA540688_cc.o: In function ‘main’:
/tmp/AAA540688_cc.o(.text+0xe6): undefined reference to ‘pow’
cc: /usr/bin/ntox86-ld error 1

You need to link with the math library by specifying -lm. The error doesn’t come from the compiler but rather from the linker.

Thank you very much Mario.