Ken Wilson wrote:
>
> I am doing some C programming on my recently installed Mandrake 6.0. As far
> as I am aware I have the latest kernel and all the updates. However, I am
> having troubles compiling a small test program with pgcc(gcc) and suspect
> the libraries are missing or improperly linked as I can't use the log()
> function. I have the #include <math.h> statement at the beginning of the
> program. Here is the error I am getting.
>
> "... undefined reference to 'log'
> collect2: ld returned 1 exit status"
Did you ommit the '-lm' switch, as discussed on the list a couple of hours
ago in another thread :)
cd ~/code/
gcc -Wall -g -o limits -lm LIMITS.C
Compilation finished at Tue Jul 20 10:28:58
Then running in the debugger:
Current directory is /home/sjm/code/
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-mandrake-linux"...
(gdb) r
Starting program: /home/sjm/code/limits
CPU usage: User= 0.040000, System = 0.020000
Current priority = 0
Current FSIZE limit: soft = 2147483647, hard = 2147483647
Setting a 2K file size limit
Program received signal SIGXFSZ, File size limit exceeded.
0x2ab91fb4 in __libc_write () from /lib/libc.so.6