nanf not defined in fimg-math.c #2

Closed
opened 2021-05-10 17:50:12 +11:00 by Mutah · 2 comments

A build error happens while building fimg2pnm :

gcc -Wall -fpic -g -DDEBUG_LEVEL=0 -lm fimg2pnm.c ../libfloatimg.a -o fimg2pnm 
/usr/bin/ld : ../libfloatimg.a(fimg-math.o) : dans la fonction « fimg_get_maxvalue » :
/home/fgirault/Temp/floatimg/lib/fimg-math.c:27 : référence indéfinie vers « nanf »
collect2: error: ld returned 1 exit status
make: *** [Makefile:37 : fimg2pnm] Erreur 1
=== error on tools = 2
A build error happens while building fimg2pnm : ``` gcc -Wall -fpic -g -DDEBUG_LEVEL=0 -lm fimg2pnm.c ../libfloatimg.a -o fimg2pnm /usr/bin/ld : ../libfloatimg.a(fimg-math.o) : dans la fonction « fimg_get_maxvalue » : /home/fgirault/Temp/floatimg/lib/fimg-math.c:27 : référence indéfinie vers « nanf » collect2: error: ld returned 1 exit status make: *** [Makefile:37 : fimg2pnm] Erreur 1 === error on tools = 2 ```
Author

Got it: "-lm" shall appears the end like this:

gcc -Wall -fpic -g -DDEBUG_LEVEL=0  fimg2png.c ../libfloatimg.a -lpnglite -lz -lm -o fimg2png

And all works fine ...

Got it: "-lm" shall appears the end like this: ``` gcc -Wall -fpic -g -DDEBUG_LEVEL=0 fimg2png.c ../libfloatimg.a -lpnglite -lz -lm -o fimg2png ``` And all works fine ...
Owner

well spotted

20e2f1e..77e967c master -> master

well spotted 20e2f1e..77e967c master -> master
tTh closed this issue 2021-05-16 21:20:19 +11:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tTh/FloatImg#2
No description provided.