I am willing to write some programs in C/C++ for Solaris machine.
I am pretty good in C++ programming for PC.
But I have some questions, while starting programming in solaris.
Which one is the most suitable & easy to use compiler?
(Most probabaly I will use vi editor to edit programs, any suggestions welcomed)
From where I can get that compiler and how to install the compiler
From where I can get C/C++ libraries for Solaris/UNIX?
How to start compiling and running program?
Will those programs written portable on both LINUX/SOLARIS?
I'd suggest gcc. At its very simplest, gcc filename1.c -o filename can transform one C file into one executable. More complex options and methods are there to transform .c files into .o files, which can all be linked together into one executable. Try 'gcc --version' to see if you have it already.
(Most probabaly I will use vi editor to edit programs, any suggestions welcomed)
Text is text, the compiler doesn't care. Personally I prefer editors designed for keyboards newer than the ADM3A but tastes differ
Depends what you mean. A program compiled on solaris won't run on linux and vice versa, but proper C code using portable features should compile fine in either.
The first approach is the preferred one and I don't think you can compile a single executable to work on both Linux and Solaris machines. Differences in MPU instruction set, endianness etc. come into play during compilation so the object code produced on one platform would be incompatible on the other.