This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

pow(),cos() ....


A very simple math c-program lile this

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

int main()
{
    double t1,t2,t3;
    t2=2.0;
    t3=3.0;
    t1 = pow(t2,t3);
    t2 = cos(t3);
    printf(" t1= %10.7f \n", t1);
    printf(" t2= %10.7f \n", t2);
    return 0;
}

with GCC version 2.95.2 19991024 (release) on
Linux SuSe 7.0 after

(gcc ctest.c -o ctest) results in

udefined reference to 'pow'
udefined reference to 'cos'

What am I doing whrong?












Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]