[osg-users] [osgPlugins] Cannot use freetype for openscenegraph example

duc nguyen minhduct4 at gmail.com
Wed Jul 20 09:20:00 PDT 2016


Hi,

First I build OpenSceneGraph from source and run the example_osgViewerIPhone and it works. Then I tried to integrate freetype plugin to this target.

I build osgdb_freetype target from source after config include and library paths of freetype I downloaded from openframeworks as the README.txt of OSG suggested. The result it make a lib file libOpenThreadsd.a in my lib folder. Then I add this lib to project from Build Phases and build again but many errors occur below.

I also try manual build FreeType for iOS Simulator from source but the result is same.

Addition Info: I build OSG for iphone Simulator so all config of Architectures is same i386. OSG Version 3.2.3. CMake ver 3.2.0. Xcode 6.1. MacOS 10.9.4. iOS 8.1

So how can I make freetype plugin use for OSG project correctly, or how to build freetype for iOS Simulator? Please give me some suggestions, many thanks.

This is my error log:


Code:
Undefined symbols for architecture i386:
  "_FT_Done_Face", referenced from:
      FreeTypeFont::~FreeTypeFont() in libosgdb_freetyped.a(FreeTypeFont.o)
  "_FT_Done_FreeType", referenced from:
      FreeTypeLibrary::~FreeTypeLibrary() in libosgdb_freetyped.a(FreeTypeLibrary.o)
  "_FT_Get_Char_Index", referenced from:
      FreeTypeFont::getKerning(unsigned int, unsigned int, osgText::KerningType) in libosgdb_freetyped.a(FreeTypeFont.o)
  "_FT_Get_Kerning", referenced from:
      FreeTypeFont::getKerning(unsigned int, unsigned int, osgText::KerningType) in libosgdb_freetyped.a(FreeTypeFont.o)
  "_FT_Init_FreeType", referenced from:
      FreeTypeLibrary::FreeTypeLibrary() in libosgdb_freetyped.a(FreeTypeLibrary.o)
  "_FT_Load_Char", referenced from:
      FreeTypeFont::getGlyph(std::pair<unsigned int, unsigned int> const&, unsigned int) in libosgdb_freetyped.a(FreeTypeFont.o)
      FreeTypeFont::getGlyph3D(unsigned int) in libosgdb_freetyped.a(FreeTypeFont.o)
  "_FT_New_Face", referenced from:
      FreeTypeLibrary::getFace(std::string const&, unsigned int, FT_FaceRec_*&) in libosgdb_freetyped.a(FreeTypeLibrary.o)
  "_FT_Open_Face", referenced from:
      FreeTypeLibrary::getFace(std::istream&, unsigned int, FT_FaceRec_*&) in libosgdb_freetyped.a(FreeTypeLibrary.o)
  "_FT_Outline_Decompose", referenced from:
      FreeTypeFont::getGlyph3D(unsigned int) in libosgdb_freetyped.a(FreeTypeFont.o)
  "_FT_Outline_Get_BBox", referenced from:
      FreeTypeFont::getGlyph3D(unsigned int) in libosgdb_freetyped.a(FreeTypeFont.o)
  "_FT_Set_Charmap", referenced from:
      FreeTypeLibrary::verifyCharacterMap(FT_FaceRec_*) in libosgdb_freetyped.a(FreeTypeLibrary.o)
  "_FT_Set_Pixel_Sizes", referenced from:
      FreeTypeFont::init() in libosgdb_freetyped.a(FreeTypeFont.o)
      FreeTypeFont::setFontResolution(std::pair<unsigned int, unsigned int> const&) in libosgdb_freetyped.a(FreeTypeFont.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)



Thank you!

Cheers,
duc

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68183#68183








More information about the osg-users mailing list