LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-11-2011, 09:45 PM   #1
kawaikx15
LQ Newbie
 
Registered: Nov 2011
Posts: 13

Rep: Reputation: Disabled
SDL, gcc & Fedora


Hi there, I have installed FEDORA 16 Recently. I am learning graphics in c programming.
I have installed SDL using:
sudo yum install SDL*
sudo yum groupinstall 'Development Tools'

On compiling I am getting lot of undefined references to SDL_Init, MapRGB, LockSurface, UnlockSurface etc..

I am clueless. please tell me how to solve this problem..

thanks in advance
 
Old 11-11-2011, 10:19 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,187

Rep: Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507
you might want to read the gcc porting guides for the VERY VERY VERY new gcc4.6 in fedora 16
http://gcc.gnu.org/
http://gcc.gnu.org/gcc-4.6/
http://gcc.gnu.org/gcc-4.6/changes.html
code that is no longer supported in 4.6
http://gcc.gnu.org/gcc-4.5/changes.html#obsoleted

most programs WILL need to be hacked in order to build with gcc 4.6


welcome to life using fedora
fedora is almost always way too new for most things .
MOST programs WILL need some editing/hacking to build in fedora 16

googling the errors will help you and point you in the right direction .

But then you should already know this from the research you did on just what fedora is , before you installed it.

Last edited by John VV; 11-11-2011 at 10:21 PM.
 
Old 11-12-2011, 02:34 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,705

Rep: Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294
SDL_Init : A symbol in libSDL.so. Package name = SDL-devel

MapRGB : The same.

LockSurface : Not found in any SDL library. ( SDL_LockSurface is present.)
Same for UnlockSurface. The symbol name is SDL_UnlockSurface.


About gcc : Install compat-gcc-34-c++.
Use with e.g. : ./configure CC=gcc34 CXX=g++34
Or : make CC=gcc34 CXX=g++34

.
 
Old 11-19-2011, 04:26 AM   #4
kawaikx15
LQ Newbie
 
Registered: Nov 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
actually it was an error of 'missing path to library' .. SDL libraries were outside the standard lib folder.. I added the SDL library path in the compile command and it worked very well... thanks a lot..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error in compiling SDL code using gcc richman1234 Programming 3 02-01-2013 06:56 PM
gcc cant find SDL.h, but its there! unholy Programming 27 06-11-2010 01:16 AM
Trying to program an SDL application but cannot find the SDL.h file:SuSE 9.2&KDevelop pujolasdf Linux - Newbie 4 03-13-2005 07:50 AM
KDevelop & SDL Corant Programming 4 07-15-2004 06:31 AM
opengl && SDL gui10 Programming 2 10-23-2001 11:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration