U
u04f061
Guest
Estou usando o Ubuntu e gcc para c compilação.Eu projetei o seguinte programa,
# include
# include
int main () (
float x = 10,0;
float y = 30,0;
printf ( "\ n% f% \ t% f \ t 1F", log (x), log2 (x), sqrt );
return 0;
)
Este é o resultado da linha de comando do gccmsiddique Ejaz (a): ~ / cproj $ gcc-o math.c matemática
math.c: Em função principal:
math.c: 6: warning: implicit declaration incompatibilidade de função interna log2 / tmp / ccLMCrbz.o: In function `main ': math.c
<img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" />
. text 0 x4d): undefined reference to `sqrt '
: math.c
<img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" />
. text 0 x61): undefined reference to `log2 '
: math.c
<img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" />
. text 0 x6f): undefined reference to `log '
collect2: ld returned 1 exit status
msiddique Ejaz (a): ~ / $ cprojpor favor me ajude a resolver este problema
# include
# include
int main () (
float x = 10,0;
float y = 30,0;
printf ( "\ n% f% \ t% f \ t 1F", log (x), log2 (x), sqrt );
return 0;
)
Este é o resultado da linha de comando do gccmsiddique Ejaz (a): ~ / cproj $ gcc-o math.c matemática
math.c: Em função principal:
math.c: 6: warning: implicit declaration incompatibilidade de função interna log2 / tmp / ccLMCrbz.o: In function `main ': math.c
<img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" />
. text 0 x4d): undefined reference to `sqrt '
: math.c
<img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" />
. text 0 x61): undefined reference to `log2 '
: math.c
<img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" />
. text 0 x6f): undefined reference to `log '
collect2: ld returned 1 exit status
msiddique Ejaz (a): ~ / $ cprojpor favor me ajude a resolver este problema