Author Topic: Linux Programming  (Read 1372 times)

leoric1928

  • Newbie
  • *
  • Posts: 10
  • Kudos: 0
Linux Programming
« on: 21 December 2002, 16:18 »
Good day,

   How can i learn linux programming? I don't mean any shell programming but the actual linux kernel program (the operating system).  Any url or good books or tutorial will be of great help. tnx

smokey

  • Member
  • **
  • Posts: 183
  • Kudos: 0
Linux Programming
« Reply #1 on: 21 December 2002, 16:56 »
Do you know C++ or C? If not search on Google for C/C++ tutorials.

If you do - start with console programs.  These are similar to wind0s console apps - you use a Main() function.

This is a very simple C++ program
Code: [Select]

To compile this - you need the compile tools that are on your distro's cd.

Save this example into a file and compile it with the command (in the console)

Code: [Select]

This command will compile the C++ code file "first.cpp" into the program file named first. It will use the file format called "a.out" (by default)

To run this program just type
Code: [Select]

As for GUI programs do a search on Google and search for tutorials for this.

I hope this is of some use to you  
//this is how I was born :)

cat /dev/urandom > /dev/mybrain

Tip for win98 (l)users: type copy /con/con in your command prompt to increase stability


Doogee

  • VIP
  • Member
  • ***
  • Posts: 774
  • Kudos: 109
    • http://m-db.info
Linux Programming
« Reply #2 on: 21 December 2002, 16:56 »
isnt the linux kernel done in c or c++ ?

smokey

  • Member
  • **
  • Posts: 183
  • Kudos: 0
Linux Programming
« Reply #3 on: 21 December 2002, 16:58 »
quote:
Originally posted by Got Doogee?:
isnt the linux kernel done in c or c++ ?


yes it is done in C
//this is how I was born :)

cat /dev/urandom > /dev/mybrain

Tip for win98 (l)users: type copy /con/con in your command prompt to increase stability


leoric1928

  • Newbie
  • *
  • Posts: 10
  • Kudos: 0
Linux Programming
« Reply #4 on: 21 December 2002, 17:17 »
Tnx for your reply. I already know C, but not C++. Is C++ required in linux programming? or I can deal with it using C? Hope anyone can suggest any good book about linux programming. tnx again

smokey

  • Member
  • **
  • Posts: 183
  • Kudos: 0
Linux Programming
« Reply #5 on: 21 December 2002, 17:22 »
quote:
Originally posted by leoric1928:
Tnx for your reply. I already know C, but not C++. Is C++ required in linux programming? or I can deal with it using C? Hope anyone can suggest any good book about linux programming. tnx again


No - C++ Knowledge is not required. As for books I dont know any by name but recall seeing some in some bookshops not a month ago - so your best bet would be to find a good bookshop and look in the computers & programming sections.
//this is how I was born :)

cat /dev/urandom > /dev/mybrain

Tip for win98 (l)users: type copy /con/con in your command prompt to increase stability


Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
Linux Programming
« Reply #6 on: 21 December 2002, 17:35 »
http://www.kernelhacking.org/

[ December 21, 2002: Message edited by: X11 ]