Sunday, July 12, 2009

I'm trying to find out how to program in Unix via C or C++ (and which one to pick). Whre do I begin?

1) What language to use?


2) How can I tie in with a vendor's API?


3) For solaris (or other unix variant) how to I know what header files etc. to use? For instance: #include %26lt;sys/types.h%26gt; and #include %26lt;unistd.h%26gt;.


4) Network communication


5) Everything else to create a full Unix app. I mostly need to tie into other APIs.





Thanks!

I'm trying to find out how to program in Unix via C or C++ (and which one to pick). Whre do I begin?
1. Use C. You might say that UNIX and C are "made for each other", but in actuality they are made by one another. Since most parts of UNIX (and many UNIX-like OSes) were coded in C it remains a C application developer-friendly environment.





2. That really depends on the specific API and what type of program youre planning to make.





3. There should be documentation manuals or "man pages" on any decent UNIX-like OS installation you will find. This includes ANSI C man pages and man pages for several common APIs like sockets or POSIX threads. These manuals detail the functions and which header files or and/or library files are required.





4. I recommend starting with Beej's Guide to Network Programming, here: http://beej.us/guide/bgnet/





5. Just dive in! If you have a handle on the language then you can start with standard ANSI code, which will compile under ANY compiler that supports ANSI C such as gcc, which generally exists on a UNIX system. Then as you develop more and more you will become aware of the functions and libraries that you might need as you go along. IRC has several programming oriented chat rooms or "channels" which can be a good resource. Try these #c on any of these servers: irc.freenode.net, irc.efnet.net, irc.undernet.org





Good luck!
Reply:Use C++
Reply:use c++. it is OOP language so programming will be good. get a good compiler it will do all the things u want. if not then search for the library files for one in google.

artificial flowers

No comments:

Post a Comment