GCC questions

Manolis Stamatogiannakis mstamat at csd.uoc.gr
Fri Nov 21 11:18:32 EET 2003


Kaneis link th math library? (gcc -lm foo.c)

M.

On Fri, 21 Nov 2003, Marios wrote:

> Χαιρετώ την λίστα
> Μια και πρόσφατα είχε θέμα με c/c++, αντιμετωπίζω το εξής πρόβλημα με τον
> gcc σε linux.
>
> #include <stdio.h>
> #include <math.h>
> #include <stdlib.h>
> #include........
>
>
>
>
> int main(int argc, char *argc[])
> {
> float tmp11;
> float min_mn;
> int i=5;
> int alpha=1;
> .
> .
> .
> .
>
> tmp11=min_mn*pow(alpha,(float)(i-1));
>
> .
> .
> .
> }
>
>
> Δεν κάνει compιle (gcc 2dslinv.c) διότι λέει τέτοιο
> Pow .... undefined ....
> Το ίδιο και για οποιοδήποτε άλλη μαθηματική συνάρτηση  (π.χ. log,
> exp,......)
> Έχω δοκιμάσει κάθε πιθανή εκδοχή
> (float)pow(alpha,(i-1))
> (float)pow((int)alpha,(int)(i-1))
> Κτλ, αλλά λέει parse error ή pow undefined.
> Το παράξενο είναι ότι ο ίδιος κώδικας γίνεται compile σε windows με τους
> εξής compilers
> Microsoft
> Intel
> DJGPP  (της gnu για windows)
> Borland
>
> Τι γίνεται?
>
> Ευχαριστώ
>
>
> --
> linux-greek-users mailing list -- http://lists.hellug.gr
>




More information about the Linux-greek-users mailing list