Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Problem with SDL

This thread is locked; no one can reply to it. rss feed Print
Problem with SDL
Scooter
Member #16,799
January 2018

Hi all:
I am back again with another problem.
I have downloaded a zip file, see above.
The debugger is pointing to line 28 in the Graphics.cpp file.

I don't understand why because it came from a SDL tutorial.
Anyway something is not quite right because I continue to receive a seg fault.

I am using Ubuntu Linux.

If someone could take a look at it I would appreciate it.
Thanks for your time.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Scooter
Member #16,799
January 2018

Edgar:
I found the problem, but I need you to explain why.
I am using codeblocks. Under linker settings is my list of libraries.
The program in question uses SDL, NOT SDL2. In my list of libraries I
had listed SDL2 before SDL. When I stepped through with the debugger
it stopped at SDL2. That is the problem because it picked up SDL2 when
it should be using SDL. I understand SDL2 is not backward compatable
with SDL. Does that make sense to you?
Why didn't codeblocks just skip over SDL2. It skipped over other libraries
that were not used. I have never had anything like this happen before.
Oh well, we live and learn. Please, let me know your thoughts on this.

BTW, the debugger in my codeblocks version is GDB.

Thanks

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Scooter
Member #16,799
January 2018

Edgar:

Thanks for the info!

Chris Katko
Member #1,881
January 2002
avatar

Scooter said:

The program in question uses SDL, NOT SDL2.

This problem has caused me SO. MANY. PROBLEMS. for their stupid naming scheme / include directory path when trying to compile SDL projects from github. It's like a living endorsement of snap/docker/whatever packages that completely encapsulate dependencies into the executable / virtual machine.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Go to: