Fred JamesSat Sep 8 20:12:41 PDT 2007
larry price wrote: >you want to use > >gcc C.c -oC -lm > >to make it load the library correctly. > > > >On 9/8/07, Fred James <fredjame at fredjame.cnc.net> wrote: > > >>larry price wrote: >> >> >> >>>#include <math.h> >>>#include <stdio.h> >>>main() >>> { >>> int i=5; >>> for(;i;) printf("%c ",(int)(81+7.3*sin(i---5.75))); >>>} >>> >>>certain aspects of computing are fundamentally arbitrary, >>> >>>http://pastebin.com/f1b9fa8dc >>> >>> >>> >>> >>> >>Larry Price >>I may be missing something ... compiling the above (gcc C.c -o C) >>resulted in ... >>~/tmp/ccKXlIHx.o: In function `main': >>C.c:(.text+0x2d): undefined reference to `sin' >>collect2: ld returned 1 exit status >> >>Could this be a C++ thing? (I followed the link provided and the comment >>style is C++). >>Regards >>Fred James >> >>Mandriva 2007 >>gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk) >> >> >> Larry Price Thank you - what interested me most was another/different look at the for loop. Regards Fred James