Lazy Foo's SDL tutorials on Linux

Lazy Foo's SDL tutorials on Linux

Postby gordebak » 29 Jan 2011, 12:38

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.
User avatar
gordebak
MnMS Moderator
 
Posts: 50
Joined: 28 Jan 2011, 04:52
Location: Ankara, Turkey

Who is online

Users browsing this forum: No registered users and 1 guest