From: Apollo Wong at University of Alberta Subject: Math functions not included? To: djgpp AT sun DOT soe DOT clarkson DOT edu (GCC mailing list) Date: Thu, 11 Jun 92 14:51:42 MDT Mailer: Elm [revision: 66.25] Hi there, After experimenting with other functions included in , I found that none of the function in can be linked into my program. I have the libm.a libc.a libpc.a libm_p.a libc_p.a libc_p.a and more files in my lib directory. I don't have a FPU so I used set GO32 = emu d:/djgpp/emu387/emu387 in my autoexec.bat file. The following program will not compile (it compiles in UNIX using gcc -lm ..) "math.c" #include #include extern double sqrt( double ); void main() { (void) printf("%f", sqrt(123.456)); return; } When compile with gcc -Wall -ansi -lm -lc math.c I got the following error messages: In file included from d:/djgpp/include/varargs.h:7, from d:/djgpp/include/stdio.h:239, from math.c:1: d:/djgpp/include/stdarg.h:38: warning: built-in function `__builtin_saveregs' redeclared math.o: Undefined symbol _sqrt referenced from text segment Does anyone have this problem? Do I have to recompile my libm.a file? Where can I get a make.exe that will work on the makefile included? Thanks in advance. Apollo Wong -- --------------------------------------------------------------------------- | Apollo WONG S.Y. | Third Year Electrical Engineering, | | Internet : Apollo AT EE DOT Ualberta DOT CA | University of Alberta, Canada. | ---------------------------------------------------------------------------