2017-06-11 6 views
0

Je suis en train de compiler un jeu basé Allegro sur mon Mac OSX Sierra et je l'erreur suivante:Allegro 5.2 TTF Addon manquant dans Mac OSX construire

Undefined symbols for architecture x86_64: 
"_al_init_ttf_addon", referenced from: 
__al_mangled_main in main.cpp.o 

I compilé Allegro 5.2.3 de la source et ceux-ci sont les bibliothèques que j'ai incluses dans le fichier CMakeLists.txt pour mon jeu.

SET(LIBRARIES 
    liballegro.dylib 
    liballegro_acodec.dylib 
    liballegro_audio.dylib 
    liballegro_color.dylib 
    liballegro_dialog.dylib 
    liballegro_font.dylib 
    liballegro_image.dylib 
    liballegro_memfile.dylib 
    liballegro_main.dylib 
    liballegro_primitives.dylib) 
include_directories(/usr/local/include) 
link_directories(/usr/local/lib) 
add_executable(My_Game ${SOURCE_FILES}) 
target_link_libraries(My_Game ${LIBRARIES}) 

Dans l'Allegro 5.2.3 CMakeLists.txt j'ai les macros suivantes set:

option(WANT_TTF "Enable TTF addon" on) 
option(WANT_COLOR "Enable color addon" on) 
option(WANT_MEMFILE "Enable memfile addon" on) 
option(WANT_PHYSFS "Enable PhysicsFS addon" on) 
option(WANT_PRIMITIVES "Enable primitives addon" on) 
option(WANT_NATIVE_DIALOG "Enable native dialog addon" on) 
option(WANT_VIDEO "Enable video player addon" on) 
option(WANT_MONOLITH "Include all addons in the main library" off) 

Après la construction et l'installation, je ne vois pas allegro_ttf.h dans/usr/local/include où tous les autres en-têtes allegro sont installés. Je ne vois pas non plus l'allegro_ttf.dylib sous/usr/local/lib. Dans les CMakeFiles/Makefile2 pour la construction allegro Je vois ce qui suit dans Makefiles2:

# Convenience name for "all" pass in the directory. 
addons/all: addons/primitives/all 
addons/all: addons/image/all 
addons/all: addons/font/all 
addons/all: addons/audio/all 
addons/all: addons/acodec/all 
addons/all: addons/color/all 
addons/all: addons/memfile/all 
addons/all: addons/native_dialog/all 
addons/all: addons/video/all 
addons/all: addons/main/all 

.PHONY: addons/tous

Mais je ne vois pas les addons/TTF/all. Toute aide serait appréciée.

Répondre

0

Le problème est que je ne l'avais pas installer FreeType

brew install freetype 

Maintenant, il travaille!