There is a rather extensive article over at Linux Users and Developers that tells you how. The focus of the article is C/C++ but the concepts work for any development you might want to do. The article is 6 pages long but extremely useful. Check it out and let us know what else you have seen on the topic.