Patrick’s development blog

Using SDL in Debian Linux

Posted in Linux/GNU, SDL / OpenGL by Patrick on June 10, 2008

Update the repository list and install SDL using apt.

apt-get update && apt-get install libsdl1.2-dev

For other sub libraries (optional) I used the command “apt-cache search sdl” to get the name of the rest of the dev packages. For example libsdlimage-dev or libsdlnet-dev.

Compile SDL application in g++
When I compiled my SDL_net application in Linux, this worked like a charm.

g++ -o appname file.cpp -lSDLmain -lSDL_net

Advertisements

Chat App Day 1: SDLNet and networking

Posted in Uncategorized by Patrick on April 15, 2008

I started coding on my network application again this week. Things have gone very slow, I was getting confused with the library I used so I decided today that I would go back to the first library I had in mind and make a fresh start. I’m using the cross-platform library SDL_Net which is a part of my favourite library SDL (http://www.libsdl.org)

About four or five weeks ago when I attempted to make the very first part of my chat application in SDL, I didn’t have any idea at all how I would build it. After that i’ve gone trough many different libraries, trying to find the one which best suited my needs. This time, i’ve gotten some information about networked applications in general after all this testing and to my own surprise I managed to build a simple application where you can send messages to a server with many clients, that are handled using threads.

There is still a long way to go, but I sort of know what to implement now and most importantly HOW to implement it. I’m going to make the basic application first and after that make it object-oriented. I’m glad that I managed in one hour, what I couldn’t in 5-7 hours before, i’ve learned a lot : )

I’m going to make a post tomorrow with the code I got so far. I made a fresh start with this project, so I won’t post my old code however. I’m going to restart this project after all.