Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake oce on Mac Catalina missing freetype libraries #719

Open
petersktang opened this issue Oct 22, 2019 · 0 comments
Open

cmake oce on Mac Catalina missing freetype libraries #719

petersktang opened this issue Oct 22, 2019 · 0 comments

Comments

@petersktang
Copy link

petersktang commented Oct 22, 2019

I git cloned the repo into local directory "oce" on Mac Catalina, created "build" subdirectory, ran "cmake --build ../build" within the "build" subdirectory, and encountered the below:

Undefined symbols for architecture x86_64:
  "_FT_Done_Face", referenced from:
      Font_FTFont::Release() in Font_FTFont.o
      checkFont(Handle_Font_FTLibrary const&, char const*) in Font_FontMgr.o
  "_FT_Done_FreeType", referenced from:
      Font_FTLibrary::~Font_FTLibrary() in Font_FTLibrary.o
  "_FT_Get_Kerning", referenced from:
      Font_FTFont::AdvanceX(unsigned int) in Font_FTFont.o
      Font_FTFont::AdvanceY(unsigned int) in Font_FTFont.o
  "_FT_Init_FreeType", referenced from:
      Font_FTLibrary::Font_FTLibrary() in Font_FTLibrary.o
  "_FT_Load_Char", referenced from:
      Font_FTFont::loadGlyph(unsigned int) in Font_FTFont.o
      Font_FTFont::RenderGlyph(unsigned int) in Font_FTFont.o
  "_FT_New_Face", referenced from:
      Font_FTFont::Init(NCollection_UtfString<char> const&, unsigned int, unsigned int) in Font_FTFont.o
      checkFont(Handle_Font_FTLibrary const&, char const*) in Font_FontMgr.o
  "_FT_Select_Charmap", referenced from:
      Font_FTFont::Init(NCollection_UtfString<char> const&, unsigned int, unsigned int) in Font_FTFont.o
      checkFont(Handle_Font_FTLibrary const&, char const*) in Font_FontMgr.o
  "_FT_Set_Char_Size", referenced from:
      Font_FTFont::Init(NCollection_UtfString<char> const&, unsigned int, unsigned int) in Font_FTFont.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems include_directories(${FREETYPE_INCLUDE_DIRS}) and target_link_libraries(mycad ${FREETYPE_LIBRARIES}) are not effective.

"cmake -LA --build ../build .. | grep FREETYPE" returns

FREETYPE_INCLUDE_DIR_freetype2:PATH=/usr/local/include/freetype2
FREETYPE_INCLUDE_DIR_ft2build:PATH=/Library/Frameworks/Mono.framework/Headers
FREETYPE_LIBRARY_DEBUG:FILEPATH=FREETYPE_LIBRARY_DEBUG-NOTFOUND
FREETYPE_LIBRARY_RELEASE:FILEPATH=/usr/local/lib/libfreetype.dylib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant