ELESKG%NUSVM.BITNET@cunyvm.cuny.edu (Winston Seah) (06/16/89)
I am doing some simple simulations using C on a SUN 3/140 running SunOS 4.0. However, I encountered problems using 'cc'; the loader 'ld' cannot find the math library (math.h/libm.a) functions, such as log() or exp(), when I type cc -lm -o sim1 sim1.c The -lm flag is supposed to include the math lib as instructed by the manuals. To overcome that I did the following, cc -c sim1.c ld -lm -o sim1 sim1.o This went thru, but the image crashed when I executed it - segmentation fault. I compiled and executed this program on a PC using Turbo C 2.0 successfully. Am I compiling the program in the right manner? Or have I missed some critical flags? Winston Seah Dept of EE, National University of Singapore ELESKG@NUSVM.BITNET