add –lm, means to link the math library.
So the compile command is gcc -lm your_program.c –o your_program.
undefined reference to `strupr'
Because standard "string.h" doesn't have strupr function,
you have to write the function to be strupr.
Ex.
#include
void make_upper_case(char *s)
{
while (*s)
{
*s = toupper((unsigned char) *s);
s++;
}
}
No comments:
Post a Comment