Page 1 of 1

Lazy Foo's SDL tutorials on Linux

PostPosted: 29 Jan 2011, 12:38
by gordebak
Hi, if you are interested in trying Lazy Foo's tutorials, most of them work on Linux out of the box.

But I found that multi-threading tutorials don't. According to SDL documentation, SDL isn't thread-safe on Linux, if you don't use X11's multi-threading capabilities. So you have to add something to the tutorial code to work.

For example for tutorial 33's code insert these:

{l Code}: {l Select All Code}
8   #include <X11/Xlib.h>
76  //Initialize X11 multithreading
77  XInitThreads();


Then they should work.