简体   繁体   中英

SDL C++ ttf linker errors

I'm using CodeBlocks and trying to link SDL_ttf when compiling my program. I have followed thus instructions:

Add "-lSDL_ttf" in the linker command line
Put SDL_ttf.dll in library directory
Put SDL_ttf.h in include file directory

And I have this error when compiling:

ld.exe||cannot find -lSDL_ttf|
||=== Build finished: 1 errors, 0 warnings ===|

I've tried so many methods to solve this and I feel like banging my head against a brick wall.

I'm running Windows and I have moved the .dll to my system32 as well as the project folder and put the header files in my compilers includes folder.

你必须使用-lSDL2_ttf而不是-lSDL_ttf

You also need the .lib file to link against. Put the .lib file in your library directory; you may also need to add that directory to your linker's search path with the -L <path> option.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM