michaelrsweet / hp-printer-app

Example printer application for HP PCL printers using PAPPL.
Apache License 2.0
35 stars 7 forks source link

libm needs to get linked to use "pow()" #16

Closed tillkamppeter closed 2 years ago

tillkamppeter commented 2 years ago

To the line 31 of the Makefile, LIBS = ... at the end needs to get added -lm so that the pow() function works.

--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ CSFLAGS               =       -s "$${CODESIGN_IDENTITY:=-}" --timestamp -o runtime
 CFLAGS         =       $(CPPFLAGS) $(OPTIM)
 CPPFLAGS       =       '-DVERSION="$(VERSION)"' `pkg-config --cflags cups` `pkg-config --cflags pappl` $(OPTIONS)
 LDFLAGS                =       $(OPTIM) `cups-config --ldflags`
-LIBS           =       `pkg-config --libs pappl` `pkg-config --libs cups`
+LIBS           =       `pkg-config --libs pappl` `pkg-config --libs cups` -lm
 OPTIM          =       -Os -g
 # Uncomment the following line to enable experimental PCL 6 support
 #OPTIONS       =       -DWITH_PCL6=1
michaelrsweet commented 2 years ago

Dupe of #18