freetye2 use

  Environment and version: qt ubuntu 16.04 freetype-2.10.0

1. Download

   https://sourceforge.net/projects/freetype/files/freetype2/

2. Unzip the compiler  

  ./configure

  make

  sudo make install

3. compiled files stored path


  
  Header file: / usr / local / include / 

library files: / usr / local / lib /

header file path is problematic, freetype and ft2build.h should be placed outside of freetyp2. So set the header file in the .pro inside path
set only the first file path does not work, "error appears:. Undefined reference to` FT_Init_FreeType 'wrong

using .pro file in the right way to add external libraries:
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../usr/local/lib/release/ -lfreetype
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../usr/local/lib/debug/ -lfreetype
else:unix: LIBS += -L$$PWD/../../../../usr/local/lib/ -lfreetype

INCLUDEPATH += $$PWD/../../../../usr/local/include/freetype2
DEPENDPATH += $$PWD/../../../../usr/local/include/freetype2
 

 


Guess you like

Origin www.cnblogs.com/ike_li/p/11090743.html