Bernd,
        You need to link against the math library, using -lm or -lmath in
your options to cc/gcc,
eg cc -o myprog myprog.c -lm

At 10:31 AM 6/8/98 +0200, Bernd Antweiler wrote:
>Hello all together!
>
>I am programming in C under Linux with Gnu-C-Compiler and xwpe frontend (X-
>desktop). My program is nearly finished, everything has worked fine until
yet. Now I 
>have tried to use some mathematical functions like pow(x,y), sin(x), etc.. 
>#include <math.h> at the top of the C-file let me compile the file, but on
starting or 
>debugging the project an "undefined reference"-error appears. Only the
fabs(x) -
>order of this library seems to work! 
>I find the <math.h> file in the /usr/include directory and this directory
is declared 
>under compiler options and the project options, too. 
>Is there any idea to solve the problem? I use the Suse-distribution and my
Linux 
>knowledge is not so good, because it was not needed by this comfortably 
>distribution.
>Maybe a file is lost? Which file? 
>
>Thanks for your attention.
>
>Bernd Antweiler
>[EMAIL PROTECTED] 
>  
>
>
|============================================================================|
|  Scott Wegener                  | Email:  [EMAIL PROTECTED]             |
|  Programmer Analyst             |==========================================|
|  Alphatronix                    | URL: http://members.tripod.com/~wegster  |  
|  Research Triangle Park, NC     |                                          |
|============================================================================|
| There can be no greater Hell that that known by those who have been forced |
| to program in COBOL.                                                       |
|============================================================================| 

Reply via email to