0
を構築し、私は私のMac OSXシエラにアレグロ基づいて、ゲームをコンパイルしようとしていると私は次のエラーを持っている:アレグロ5.2 TTFアドオンは
Undefined symbols for architecture x86_64:
"_al_init_ttf_addon", referenced from:
__al_mangled_main in main.cpp.o
私は、ソースおよびこれらからアレグロ5.2.3をコンパイル私のゲームのCMakeLists.txtファイルに含まれているライブラリです。アレグロ5.2.3 CMakeLists.txtで
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})
は、私は以下のマクロが設定されています:
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)
構築し、インストールした後、私はは/ usr/localにallegro_ttf.h表示されていない/どこが含ま他のすべてのアレグロヘッダーがインストールされます。/usr/local/libの下にallegro_ttf.dylibも表示されません。 CMakeFilesで/ Makefile2はアレグロのビルドのために、私は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:アドオン/すべて
しかし、私はアドオン/ TTF /すべてが表示されません。どんな助けもありがとう。