From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Brian J. Dent" To: help-gcc@gnu.org Subject: gcc compile problem ... Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <4.2.0.58.20000126064259.00a8a330@redshift.com> X-SW-Source: 2000-q1/msg00168.html Message-ID: <20000401000000.x9DL8aFMxXtq37h1GTosLVOVYTUOwAaqevKPV7m8jdM@z> gcc help, Obviously I am new to the GNU gcc compiler. I've been trying compile a program on our SUN with gcc (sparc-sun-solaris2.7/2.95.1) and it contains some intrinsic functions. When I get to the point of linking it doesn't recognize the functions, eg: sqrt. Below is a test program. What is missing that I am not finding the built-in functions to link with? Thanks for any help. file:marc.c: #include #include main() { double x = 2; printf("sqrt of %d is %f\n",x,sqrt(x)); } gcc -c marc.c gcc -o marc.out marc.o Undefined first referenced symbol in file sqrt marc.o ld: fatal: Symbol referencing errors. No output written to marc.out collect2: ld returned 1 exit status - bjd ____________________________ Brian J. Dent CompuDent v (831) 649-0948 f (707) 222-1209 http://www.redshift.com/~briandent/