0

i'm working on a "makefile" on an old version of php (php-5.3.22)

fatal error: ft2build.h: No such file or directory
 #  include <ft2build.h>
                        ^
compilation terminated.

I have properly installed my freetype2 and I guess the above line is asking the file with the path "/usr/include/freetype2/ft2build.h"

how should I add in the above file to the above path?

(I can't use the gcc -c /usr/include/freetype2/ method since it will further refer to files in it while the current working path is /..../php-5.3.22)

orb
  • 175
  • 2
  • 13
  • Possible duplicate: [How to add a default include path for gcc in linux?](http://stackoverflow.com/questions/558803/how-to-add-a-default-include-path-for-gcc-in-linux) – Ilya Jul 26 '14 at 05:58

1 Answers1

0

You probably should change the makefile. Caveat, many software have their makefile generated by some configuration procedure (e.g. ./configure for GNU software using autoconf)

If your makefile is not generated, you should change some CFLAGS (or similar) variable in the makefile to add some -I option (e.g. -I /usr/include/freetype2/ and others...).

If your makefile is generated, you need to regenerate it in the appropriate way to get it correct. Perhaps by passing appropriate options to ./configure

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
  • thanks for answering, i was following a guide which asks me to input a lot of arguments in ./configure but now i understand how it works, then i have it work well with nature configure and then make... – orb Jul 26 '14 at 06:32