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.

Compiling C code in linux

Status
Not open for further replies.

ashi

Member level 4
Joined
Jan 26, 2006
Messages
77
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Egypt
Activity points
1,908
Hi
i have a c code and i need to compile it in linux
 

mostafa_elwakeel

Member level 1
Joined
May 30, 2004
Messages
33
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
egypt
Activity points
228
hi ;
you can use kdevelop with gcc compiler
thx
 

    ashi

    Points: 2
    Helpful Answer Positive Rating

maple

Member level 5
Joined
Sep 27, 2003
Messages
91
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
593
you can use PGI or intel c compiler
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
637
Reputation
1,272
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,178
You may already have a compiler. Try typing "cc --help" or "cc mycode.c" and see what happens.
 

    ashi

    Points: 2
    Helpful Answer Positive Rating

VirtualThread

Member level 5
Joined
Aug 4, 2005
Messages
80
Helped
8
Reputation
16
Reaction score
3
Trophy points
1,288
Location
US
Activity points
1,806
nearly Each Linux Distribution is shipped with GNU Compiler Collection (gcc) and I thinkg it would be the best choice to use to compile your C program.
 

z81203

Full Member level 5
Joined
Aug 1, 2001
Messages
308
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,298
Activity points
2,356
there is gcc with each linux, try it.
 

cfant

Full Member level 3
Joined
Apr 4, 2001
Messages
188
Helped
25
Reputation
50
Reaction score
6
Trophy points
1,298
Location
California, USA
Activity points
1,151
gcc -o executable_file_name file_name.c

should compile simple c program. If you have more complicated application it should have a makefile. You will need to modify this makefile for your needs.
 

ilamseeker

Member level 1
Joined
Apr 7, 2006
Messages
41
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,720
gcc is the best command for compileng and executing c files...just look for the manual pages for gcc....


man gcc
 

cybersan2002

Junior Member level 3
Joined
Jul 25, 2005
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,439
Goto Start->System Tools->Terminal & press enter
use command
gcc -c sachin.o(output file) sachin.c(input File)
or for an executable file
gcc -c -o sachin.exe sachin.c
 

pankaj.sable

Newbie level 1
Joined
May 2, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
There is a compiler. type "cc --help" or "cc (file name).c" and see what happens,
nearly in Each Linux there is GNU Compiler Collection (GCC) try to use Compile C programs that is best one.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top