installing SDL on fedora

ぐ巨炮叔叔 提交于 2019-12-22 11:28:58

问题


I installed FEDORA and SDL and wish to program graphics in C. on compilation, I am getting lot of undefined references to SDL_MapRGB, SDL_Init etc I searched the file system SDL.dll is missing..

how to solve this problem?


回答1:


Linux does not use .dll files for storing libraries, but .so.

Anyhow, to install SDL in fedora:

sudo yum install SDL*

This will install the complete SDL library with associated devel packages.

You will also probably want to install the Development Tools group of packages (for gcc and other build tools):

sudo yum groupinstall 'Development Tools'

When compiling, you will need to tell GCC which library to link:

gcc mycoolapp.c -o myapp -lSDL -lSDL_mixer


来源:https://stackoverflow.com/questions/8102313/installing-sdl-on-fedora

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!