Hi, thanks for this excellent book! regarding the compilation of "huge-test.c" program in chapter 4
I add this error when launching compilation
$ gcc -Wall -Wextra -pedantic huge-test.c -o huge-test
/usr/bin/ld: /tmp/ccSn74Ix.o: in function main': huge-test.c:(.text+0x1e): undefined reference topow'
collect2: error: ld returned 1 exit status
Linking against math lib using -lm worked:
$ gcc -Wall -Wextra -pedantic huge-test.c -lm -o huge-test
My OS is ubuntu 20 (up to date)
Hi, thanks for this excellent book! regarding the compilation of "huge-test.c" program in chapter 4 I add this error when launching compilation $ gcc -Wall -Wextra -pedantic huge-test.c -o huge-test /usr/bin/ld: /tmp/ccSn74Ix.o: in function
main': huge-test.c:(.text+0x1e): undefined reference to
pow' collect2: error: ld returned 1 exit statusLinking against math lib using -lm worked: $ gcc -Wall -Wextra -pedantic huge-test.c -lm -o huge-test My OS is ubuntu 20 (up to date)