LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-01-2006, 06:49 PM   #1
graciejj_82
Member
 
Registered: Feb 2006
Distribution: Fedora 2
Posts: 63

Rep: Reputation: 15
SDL quit compiling


I setup SDL the other night so i cant start learning to make games.

I'm using the tutorials from Lazy Foo. I did lesson 2. And it worked fine. I tried to do it again tonight, and I get ALOT of errors in compiling. This is just SOME of the message I get. The list is larger than can be shown on one terminal screen, even when scrolling up and down. See below.


/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(SDL_x11mouse.o)(.text+0x7ab): In function `X11_CheckMouseModeNoLock':
: undefined reference to `XGetPointerControl'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(SDL_x11mouse.o)(.text+0x8a1): In function `X11_CheckMouseModeNoLock':
: undefined reference to `XChangePointerControl'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x24): In function `find_display':
: undefined reference to `XextCreateExtension'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x3c): In function `find_display':
: undefined reference to `XextFindDisplay'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x80): In function `find_display':
: undefined reference to `XextAddDisplay'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xb3): In function `close_display':
: undefined reference to `XextRemoveDisplay'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x1ae): In function `SDL_XF86VidModeSetClientVersion':
: undefined reference to `XMissingExtension'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x1dc): In function `SDL_XF86VidModeSetClientVersion':
: undefined reference to `_XFlush'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x28c): In function `SDL_XF86VidModeQueryVersion':
: undefined reference to `_XReply'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x2ce): In function `SDL_XF86VidModeQueryVersion':
: undefined reference to `XMissingExtension'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x337): In function `SDL_XF86VidModeQueryVersion':
: undefined reference to `_XFlush'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x464): In function `SDL_XF86VidModeSetGamma':
: undefined reference to `XMissingExtension'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x494): In function `SDL_XF86VidModeSetGamma':
: undefined reference to `_XFlush'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x543): In function `SDL_XF86VidModeGetGamma':
: undefined reference to `_XReply'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x58e): In function `SDL_XF86VidModeGetGamma':
: undefined reference to `XMissingExtension'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x614): In function `SDL_XF86VidModeGetGamma':
: undefined reference to `_XFlush'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x682): In function `SDL_XF86VidModeGetModeLine':
: undefined reference to `XMissingExtension'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x71b): In function `SDL_XF86VidModeGetModeLine':
: undefined reference to `_XReply'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x7e7): In function `SDL_XF86VidModeGetModeLine':
: undefined reference to `_XRead'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x81a): In function `SDL_XF86VidModeGetModeLine':
: undefined reference to `_XFlush'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x843): In function `SDL_XF86VidModeGetModeLine':
: undefined reference to `_XReply'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x8eb): In function `SDL_XF86VidModeGetModeLine':
: undefined reference to `_XEatData'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x954): In function `SDL_XF86VidModeGetAllModeLines':
: undefined reference to `XMissingExtension'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x9e9): In function `SDL_XF86VidModeGetAllModeLines':
: undefined reference to `_XReply'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xaf0): In function `SDL_XF86VidModeGetAllModeLines':
: undefined reference to `_XRead'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xb9f): In function `SDL_XF86VidModeGetAllModeLines':
: undefined reference to `_XRead'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xbac): In function `SDL_XF86VidModeGetAllModeLines':
: undefined reference to `_XFlush'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xc1d): In function `SDL_XF86VidModeGetAllModeLines':
: undefined reference to `_XRead'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xce0): In function `SDL_XF86VidModeGetAllModeLines':
: undefined reference to `_XEatData'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xd03): In function `SDL_XF86VidModeGetAllModeLines':
: undefined reference to `_XEatData'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xd79): In function `SDL_XF86VidModeAddModeLine':
: undefined reference to `XMissingExtension'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xf3e): In function `SDL_XF86VidModeAddModeLine':
: undefined reference to `_XSend'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0xf48): In function `SDL_XF86VidModeAddModeLine':
: undefined reference to `_XFlush'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x108a): In function `SDL_XF86VidModeAddModeLine':
: undefined reference to `_XFlush'
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libSDL.a(XF86VMode.o)(.text+0x116f): In function `SDL_XF86VidModeDeleteModeLine':
 
Old 04-01-2006, 06:51 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
It looks like your compiler can no longer find the correct X libs or their headers to link everthing up together. Have you updated recently?
 
Old 04-02-2006, 09:06 AM   #3
dopehouse
Member
 
Registered: May 2004
Location: Hildesheim(Germany)
Distribution: Debian Etch with Kernel 2.6.x (latest vanila)
Posts: 62

Rep: Reputation: 15
These are the kind of errors I get, when try to compile as static. Can you post the command you used to compile? E.g. gcc ?.....?
 
Old 04-02-2006, 09:57 AM   #4
graciejj_82
Member
 
Registered: Feb 2006
Distribution: Fedora 2
Posts: 63

Original Poster
Rep: Reputation: 15
well, i had to reinstall fedora anyways, and i started messing with the SDL again. Fedora 2 comes with an earlier version of sdl installed. I did the tutorial again, and it worked with the other version. Then I downloaded the new version and did "rpm -U SDL.rpm" and thats when everything quits working. I was wondering if I maybe should have used "rpm -F"?

Anyways, now I'm thinking it might be easier to remove SDL from my computer all together, and install the rpm from scratch with no previous versions. Would this fix the problem? and if so, how do I remove the current version from my pc??


Thanks for your help,
Michael
 
Old 04-02-2006, 10:25 AM   #5
graciejj_82
Member
 
Registered: Feb 2006
Distribution: Fedora 2
Posts: 63

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dopehouse
These are the kind of errors I get, when try to compile as static. Can you post the command you used to compile? E.g. gcc ?.....?
BTW, I'm compliling with:
g++ -o les2 lesson02.cpp -lSDL

And it worked fine before I updated the SDL.rpm
 
Old 04-02-2006, 10:40 AM   #6
dopehouse
Member
 
Registered: May 2004
Location: Hildesheim(Germany)
Distribution: Debian Etch with Kernel 2.6.x (latest vanila)
Posts: 62

Rep: Reputation: 15
It's better to use
Code:
g++ -o les2 lesson02.cpp `sdl-config --cflags --libs`
`sdl-config --cflags --libs` will than be replaced by the output from sdl-config. You can try it in your terminal.
Code:
sdl-config --cflags --libs
I don't think that this will solve the problem you have, but it's a better way to link against all needed libraries.
 
  


Reply



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
Problem compiling SDL-Programm Cornholio Programming 2 03-07-2005 10:57 AM
SDL compiling problem kubaj Programming 2 10-27-2004 11:15 AM
SDL error while compiling software icehenge Linux - Software 1 09-28-2004 04:06 PM
SDL Compiling Help slackwarefan Linux - Software 1 02-18-2004 04:41 PM
SDL Error While Compiling... Chryzmo Linux - Newbie 1 09-01-2003 12:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:33 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
Open Source Consulting | Domain Registration