
--
In order to compile Serpent with GD2 library installed via MacPorts, one needs to add the following lines to Makefile so that GCC can find gd.h file etc.
Code: Select all
CFLAGS += -I/opt/local/include
LDFLAGS += -L/opt/local/lib
Code: Select all
plotgeometry.c:5:16: error: gd.h: No such file or directory
plotgeometry.c: In function 'PlotGeometry':
plotgeometry.c:28: error: 'gdImagePtr' undeclared (first use in this function)
plotgeometry.c:28: error: (Each undeclared identifier is reported only once
plotgeometry.c:28: error: for each function it appears in.)
plotgeometry.c:28: error: expected ';' before 'im'
plotgeometry.c:29: warning: ISO C90 forbids mixed declarations and code
plotgeometry.c:748: error: 'im' undeclared (first use in this function)
plotgeometry.c:748: warning: implicit declaration of function 'gdImageCreate'
plotgeometry.c:752: warning: implicit declaration of function 'gdImageColorAllocate'
plotgeometry.c:780: warning: implicit declaration of function 'gdImageSetPixel'
plotgeometry.c:801: warning: implicit declaration of function 'gdImagePng'
plotgeometry.c:809: warning: implicit declaration of function 'gdImageDestroy'
Code: Select all
ld: library not found for -lgd
collect2: ld returned 1 exit status
make: *** [sss] Error 1