On 16 Vas, 16:51, Sreenivas <thatiparthysreeni...@gmail.comwrote:
I dont know how to compile cpp programs with gcc as i am new to gcc
and cpp.
could anybody help me out?
Thanks&Regards,
Srinivas Reddy Thatiparthy.
Use gcc for C and for C++ use g++.
g++ -Wall -ansi -pedantic -o <name[file1, file2, ...]
But if you want to do it in correct way first of all you should build
Obj files.
g++ -Wall -ansi -pedantic -o <module_name<module_file>
After you have all modules and main program compiled, link them.
g++ -o <program_name[file1.o, file2.o, ...]