Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to run a c program in LINUX?

Status
Not open for further replies.

wildfyr8

Newbie level 4
Joined
Apr 13, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,321
hello people i can't able to run a program in Linux. i am using X.swp, X.swo, X.swn and X. to extract in Linux with some C program inside it. so that i can run it.

program is manage others system (i.e., without LAN) with a GPRS modem.

Please help me out to solve this issue

Regards,
Wildfyr.
 

running a c program in linux is easy , there is acompiler named gcc
1. type a c/c++ program in gedit ediotr
2 save it with extension .C
3 open termianl/command promot gcc -o filename.c
4. the output will be printed easily
 

Could you give some more details? Without it this is going to be random guessing.

Random guesses: you could try the following commands in the source directory (with the .c files)

Code:
./configure
make

and see if that does anything.
 

mrflibble said:
Could you give some more details? Without it this is going to be random guessing.

Random guesses: you could try the following commands in the source directory (with the .c files)

Code:
./configure
make

and see if that does anything.

Hi ,
use command
g++ filename.c -o <object file name> : enter
Before that you check ur version .If g++ is installed or not.
see this doc
 

nikhil_damle said:
running a c program in linux is easy , there is acompiler named gcc
1. type a c/c++ program in gedit ediotr
2 save it with extension .C
3 open termianl/command promot gcc -o filename.c
4. the output will be printed easily


item 3 needs to correct


gcc -o outfilename filename.c


tnx
 

if outfile name is not specified, the default is a.out
to run it in terminal type ./a.out
 

Once compiled, you may need to set the file as executable:
Code:
chmod +x outfile
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top