Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've recently started playing around with SDL, following some tutorials online. I got a basic test program going, and it compiled fine, and it ran fine until recently. Starting about two days ago, trying to run the binary (The same binary, not re-compiled) throws the following error:

./sdltest: symbol lookup error: /usr/local/lib/libSDL-1.2.so.0: undefined symbol: _XGetRequest

I'm fairly confident I didn't install or remove anything since the program stopped working. I'm running 12.10 (Have been since before I got this error, so I'm pretty sure it's not a 12.10 bug), and I've been compiling with the following commands (Extracted from my makefile):

g++ -c -o main.o main.cpp
g++ -c -o CApp.o CApp.cpp
g++ main.o CApp.o -o sdltest -lSDL

Does anybody have any idea what went wrong, and what I might be able to do to fix it?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Still not sure why this was happening with SDL1.2, but I suspect it's probably related to the below:

I removed SDL1.2 and downloaded SDL2 instead. It turns out that a 2012 update to X11 added a dynamic symbol for _XGetRequest, which is what was causing my problem in SDL2. To fix the issue, I downloaded and installed SDL2 from the official Mercurial repository, rather than from the Ubuntu package manager.

share|improve this answer

you may find this Slackware based response helpful to a similar question. It was solved.

https://www.linuxquestions.org/questions/slackware-14/libsdl-1-2-so-0-11-4-from-slackware64-current-undefined-symbol-_xgetrequest-4175456708/

share|improve this answer
    
It is preferable to include at least a summary of the solution described in the linked article than just posting the link. That way if the link becomes unavailable, the answer will still remain helpful. Please edit your answer to make is so. –  hmayag May 9 at 8:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.