Linux 7737b1369220 6.6.32-linuxkit #1 SMP Thu Jun 13 14:13:01 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
klib version 29445495262cf34f4c3b82d3917ac83f3e1f3f58
gcc -g -Wall -O2 -I.. -o kmin_test kmin_test.c ../kmath.c
../kmath.c: In function ‘krf_brent’:
../kmath.c:224:21: warning: ‘e’ may be used uninitialized [-Wmaybe-uninitialized]
224 | if (fabs(e) >= tol1 && fabs(fa) > fabs(fb)) {
| ^~~~~~~
../kmath.c:200:43: note: ‘e’ was declared here
200 | double a = x1, b = x2, c = x2, d, e, min1, min2;
| ^
/usr/bin/ld: /tmp/cca4C0vx.o: in function `kf_lgamma':
/home/user/data/klib/test/../kmath.c:280:(.text+0xcfc): undefined reference to `log'
/usr/bin/ld: /home/user/data/klib/test/../kmath.c:280:(.text+0xd0c): undefined reference to `log'
/usr/bin/ld: /tmp/cca4C0vx.o: in function `_kf_gammap':
/home/user/data/klib/test/../kmath.c:340:(.text+0xd9c): undefined reference to `log'
/usr/bin/ld: /home/user/data/klib/test/../kmath.c:340:(.text+0xdc0): undefined reference to `log'
/usr/bin/ld: /home/user/data/klib/test/../kmath.c:340:(.text+0xdd8): undefined reference to `exp'
/usr/bin/ld: /tmp/cca4C0vx.o: in function `_kf_gammaq':
/home/user/data/klib/test/../kmath.c:361:(.text+0xe84): undefined reference to `log'
/usr/bin/ld: /home/user/data/klib/test/../kmath.c:361:(.text+0xea0): undefined reference to `log'
/usr/bin/ld: /home/user/data/klib/test/../kmath.c:361:(.text+0xeb8): undefined reference to `exp'
/usr/bin/ld: /tmp/cca4C0vx.o: in function `kf_betai_aux':
/home/user/data/klib/test/../kmath.c:403:(.text+0xfc4): undefined reference to `log'
/usr/bin/ld: /home/user/data/klib/test/../kmath.c:403:(.text+0xfdc): undefined reference to `log'
/usr/bin/ld: /home/user/data/klib/test/../kmath.c:403:(.text+0xfe4): undefined reference to `exp'
/usr/bin/ld: /tmp/cca4C0vx.o: in function `kf_erfc':
/home/user/data/klib/test/../kmath.c:307:(.text+0x1044): undefined reference to `exp'
collect2: error: ld returned 1 exit status
make: *** [Makefile:54: kmin_test] Error 1
Hello,
First of all, thank you for creating such a wonderful library that greatly simplifies our application development. It's fantastic!
Shouldn't the makefile be modified? This is my own idea.
Here are my compilation environment details:
Here are the commands I used for compilation:
Here are the logs printed during compilation: