Devange Posted August 15, 2020 Posted August 15, 2020 (edited) Hello, I try to port a small console application from Raspi to an Ordoid N2. I use Code::blocks for my development and I have no trouble on Raspi 2 and Raspi 4. My project is using the math lib for 2 functions pow and log. I pickup my sources on the N2 and at link time I have these 2 errors Here are messages : gcc -Wall -fno-strict-aliasing -g -DBIG_JOINS=1 -g -I../../Lib/open2300/include -I/usr/include/mariadb -c /home/oi/devRaspi/Dev/Meteo/open2300/Appli/suivimeteo/suivimeteo.c -o obj/Debug/suivimeteo.o gcc -L/usr/lib/arm-linux-gnueabihf -o bin/Debug/SuiviMeteo obj/Debug/suivimeteo.o -lz -lm -ldl -lmysqlclient -lpthread ../../Lib/open2300/bin/Debug/libopen2300.a /bin/ld: ../../Lib/open2300/bin/Debug/libopen2300.a(rw2300.o): in function `read_history_record': /home/oi/devRaspi/Dev/Meteo/open2300/Lib/open2300/src/rw2300.c:2422: undefined reference to `pow' /bin/ld: /home/oi/devRaspi/Dev/Meteo/open2300/Lib/open2300/src/rw2300.c:2423: undefined reference to `pow' /bin/ld: /home/oi/devRaspi/Dev/Meteo/open2300/Lib/open2300/src/rw2300.c:2434: undefined reference to `log' collect2: error: ld returned 1 exit status I don't understand where could be the problem, because I have no error on raspi. Thank you for your help Edited August 15, 2020 by lanefu moderator updated title
martinayotte Posted August 15, 2020 Posted August 15, 2020 3 hours ago, Devange said: I have these 2 errors It seems that pow() is defined in /usr/include/tgmath.h ... Does some sources include this header ?
Devange Posted August 23, 2020 Author Posted August 23, 2020 No htey don't, but when i added it nothing changes. But i insist my problem is a link time not at compile time
Devange Posted August 24, 2020 Author Posted August 24, 2020 I think there is a trouble on the installation of the Gnu compiler/linker / library on this Armbian, but I don't know how to investigate this trouble...
Recommended Posts