When using the system libraries like math.h, curses.h etc you must link them
into the object file when comiling
eg gcc -ansi -Wall -o myprog myprog.c -lm
this will link the maths libraries to your program. Similar with curses etc


Kind Regards
        Renato Parletta........

To reply send mail to:   [EMAIL PROTECTED]
                    ICQ No:   130789521

         "l can only assume that a "Do Not File" document
          is filed in a "Do Not File" file."

Senator Fank Church
Senate Intelligence Subcommittee Hearing, 1975




-----Original Message-----
From: Bernd Antweiler <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, June 08, 1998 10:12 PM
Subject: undefined reference ?!?


>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]
>
>

Reply via email to