因为它有一个官方的SDLConfig.cmake文件,而你不能让SDL2_TTF工作,因为没有官方的SDL2_TTF配置文件...
我目前的猜测是,你可以让SDL工作,因为它有一个官方的SDLConfig.cmake文件,而你不能让SDL2_TTF工作...
然后通过PkgConfig模块找到你想要找到的第三方库,这里我找一下SDL2: pkg_check_modules(REQUIRED SDL2 SDL2_image SDL2_ttf SDL2_mixer) pkg_search_module(SDL2 REQUIRED sdl2) pkg_search_module(SDL2_image REQUIRED sdl2_image) pkg_search_module(SDL2_mixer REQUIRED sdl2_mixer) pkg_search_module(SD...
SDL_ttf.c:895: undefined reference to `FT_Done_Glyph'/Users/slouken/release/SDL_ttf/SDL2_ttf-2.0.12-source/foo-x86/../SDL_ttf.c:607: undefined reference to `FT_Get_Char_Index'/Users/slouken/release/SDL_ttf/SDL2_ttf-2.0.12-source/foo-x86/../SDL_ttf.c:682: ...
SDL2: example, game example SDL2_image: example SDL2_ttf: example SDL2_mixer: example SDL2_net SDL2_gfx: animation example So the only things that you should do in order to integrate the SDL2 library are: Clone SDL2 CMake modules inside your project: git clone https://github.com/...
(STATUS "Finding SDL2 packages") FIND_PACKAGE(SDL2 REQUIRED) FIND_PACKAGE(SDL2_image REQUIRED) FIND_PACKAGE(SDL2_mixer REQUIRED) FIND_PACKAGE(SDL2_ttf REQUIRED) MESSAGE(STATUS "Finding header files") INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/headers) MESSAGE(STATUS "Finding source files") ...
fatal error: SDL2/_real_SDL_config.h这表示您的系统上没有安装SDL2库,则无法编译
第二,尽可能避免手动调用pkg-config。CMake附带了一组丰富的包定义,可以在Linux的/usr/share/cmake-...
搜了很多的教程,发现要么教程太老,给的配置信息里面有些参数都不能使用了,要么就是直接扔下自己的...
我想在mac上使用c++和SDL库创建简单的应用程序。当我尝试使用makefile制作可执行文件时,我的SDl库位于"/Library/Frameworks“目录中。frameworkSDL2 -frameworkSDL2_ttf -frameworkSDL2_imageHDR = ${wildcardEXEC}: ${OBJ} ${CC} ${LDFLAGS} $^ -o ...