Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any tips on Linux programming for Windows programmer (C/C++)? [duplicate]

Tags:

c++

c

linux

Possible Duplicate:
shifting from windows to *nix programming platform

Does anyone know a good, compact resource that would allow me to migrate from Windows programming to Linux programming?

I managed to get simple apps running, checked daemon architecture, but somehow I don't know where to begin to get a better understanding of the best practices and common solutions for architecture in general.

I guess all threading, mutex, critical section, i/o, (named?)pipe stuff is probably way off from Windows development. But I can't find a good, compact documentation.

The daemons in Linux seem to be way simpler than in Windows, but I already stumbled upon fork function that is completely unusual, and there should be other things like that I guess.

Also, what's about all that POSIX compliance thing? I heard it's supposed to be platform agnostic, but I also read that it's not exactly supported under some distributions.

like image 240
Coder Avatar asked Jun 17 '11 16:06

Coder


4 Answers

The Linux Programming Interface is amazing book I am reading now:

http://www.amazon.com/Linux-Programming-Interface-System-Handbook/dp/1593272200

Just look at its outstanding customers range - it is really excellent Linux programming book.

like image 113
Alex F Avatar answered Sep 22 '22 13:09

Alex F


You might take a look at esr's The Art of Unix Programming, which will answer most of your questions.

It will explain the *nix philosophy, the design of the APIs, the origins and reasons for POSIX compatibility, and everything else.

like image 44
greyfade Avatar answered Sep 21 '22 13:09

greyfade


As far as details on the *nix API goes, this is a good set of material:

http://www.hiraeth.com/alan/tutorials/courses/unixprog.html

And somebody has pulled together a nice list of links to many resources here

While it's good to learn the target platform, I strongly recommend using Boost libraries wherever possible as wrappers around the platform-dependent behaviors (for threading, networking, etc.)

like image 38
holtavolt Avatar answered Sep 21 '22 13:09

holtavolt


Beginning Linux Programming and Advanced Linux Programming are two good resources to start with.

like image 20
taskinoor Avatar answered Sep 18 '22 13:09

taskinoor