Wednesday, August 26, 2009

Linux: Unable to compile or run C or C++ program

Linux uses gcc compiler for compiling C programs and g++ for C++ programs.If you are unable to compile or run C and C++ program in Linux terminal then follow these steps.
(1) Using vi or vim editor create a C file(should be named with .c extension) and do the same for the C++ program(should be saved as .cpp)
(2) Then compile C program using following command
$gcc -o destfile sourcefile
for example if you have created a file first.c then
$gcc -o first first.c
Your compiled file will be created as first.To run this file
$./first

For C++ use g++ command with same extensions.

If you are unable to compile or run C or C++ program OR you are getting error compiling C or C++ file that means you have not installed compiler gcc and g++ in your operating system.
Follow the steps for C:
$su

$yum install gcc

For C++
$yum install g++

This will install compilers for C and C++ for linux.I hope this will help you.

Linux:Unable to install or upgrade firefox in Linux

Installing or upgrading Firefox can be done by using different commands in Linux operating system..
(1) Using yum command you can upgrade your firefox or install.Open terminal and enter su then enter password. Now you are in admin mode so that you can install or upgrade firefox.
For installing anything in linux the user should be in admin mode.
syntax:
$su

$yum update firefox

(2)There is another way of installing firefox in linux that is by using wget command.To use wget command you should have link from where you can download firefox for linux.
Syntax:
$wget link

Set up gmail in outlook using app password

You might receive an error saying, "unable to connect to your outgoing server" while setting up a gmail account in outlook even wh...