How can I compile all of the files?

D

Dogukan Bayraktar

Hi, I'm new to C, and i've got files of the project of C, but I don't know that how to the compile all of files. How can I do it?
 
S

Shao Miller

Hi, I'm new to C, and i've got files of the project of C, but I
don't know that how to the compile all of files. How can I do it?

Hello!

Please try to limit your line length by using the <ENTER> key whenever
the line gets a bit long. (See what I've done above, for example.)

What are the names of the files? What OS are you using?

- Shao Miller
 
J

James Kuyper

Hi, I'm new to C, and i've got files of the project of C, but I don't know that how to the compile all of files. How can I do it?

The answer to your question depends upon which compiler you're using,
which operating system you're using, and whether or not you're using an
IDE (Integrated Development Environment). It also depends upon the
features of the code you're compiling - some features only work properly
if you select the right compiler options. If this project was put
together by someone else, they should have given you some kind of build
instructions - but of course, not everything that should happen does
happen. Look for a file with a name like README.txt or makefile.
 
B

BartC

Dogukan Bayraktar said:
Hi, I'm new to C, and i've got files of the project of C, but I don't know
that how to the compile all of files. How can I do it?

Are there a lot of files? Because if you're not familiar with building large
C applications, then this can get difficult! Especially if you don't use
Unix or Linux, as a lot of open source C software seems designed for that
kind of platform.

See if there is a 'binary' version of this project, that will run
straightaway, if that is all you want to do. (This is what I do too most of
the time.)
 
D

Dogukan Bayraktar

I'm using Ubuntu, and I've downloaded the files from freecode.com. There are a lot of files.. And there is a makefile in directory.. In this case, what should I do to compile the files? I want to run the program.
 
P

Paul

Dogukan said:
I'm using Ubuntu, and I've downloaded the files from freecode.com. There are a lot of files.. And there is a makefile in directory.. In this case, what should I do to compile the files? I want to run the program.

What is the name of the project ?

Can you give the URL of the project (web link), so we
can visit the site ?

Freecode.com has many projects, and you have not identified
which one.

Paul
 
M

Malcolm McLean

Hi, I'm new to C, and i've got files of the project of C,
but I don't know that how to the compile all of files. How can I do it?
If you're on a Unix type system, like Linux

If all the files are in the same directory, cc (or gcc) *.c -lm. You might
also need to link other libraries.
If they're not in the same directory, specify the paths,
e.g. gcc *.c ../superlib/*.c -lm

If you're on Winodws, load the files into your IDE and add them to the
project, using the menus and "add existing file to project" option or
similar. Then compile from, usually, the debug menu.

The compiler will give you an error saying something like "symbol xxx not
found" if you miss out a source file, OR if you are missing a library.
 
D

Dogukan Bayraktar

22 Aralık 2012 Cumartesi 16:20:45 UTC+2 tarihinde Dogukan Bayraktar yazdı:
Hi, I'm new to C, and i've got files of the project of C, but I don't know that how to the compile all of files. How can I do it?

Thanks everyone! There is a file called "INSTALL" and I've read it, so I'vewritten the following commands on Terminal and it's been compiled :)

# ./configure
# make
# make install
 
P

Paul

Dogukan said:
22 Aralık 2012 Cumartesi 16:20:45 UTC+2 tarihinde Dogukan Bayraktar yazdı:

Thanks everyone! There is a file called "INSTALL" and I've read it, so I've written the following commands on Terminal and it's been compiled :)

# ./configure
# make
# make install

Excellent. Just caught your post, as I was opening the INSTALL file :)

Paul
 
D

Dogukan Bayraktar

23 Aralık 2012 Pazar 13:39:38 UTC+2 tarihinde Ike Naar yazdı:
Have you read the file named INSTALL ?

Yes, I've read it and i've solved the problem, thanks :)
 
R

Ralph Spitzner

Dogukan said:
Hi, I'm new to C, and i've got files of the project of C, but I don't know that how to the compile all of files. How can I do it?

Just out of curiosity, have you looked at the last revision date ?


-rasp
 
K

Keith Thompson

Ralph Spitzner said:
Just out of curiosity, have you looked at the last revision date ?

The last revision date of what? How is that relevant to the question?
 
R

Ralph Spitzner

Keith Thompson wrote:
[...]
The last revision date of what? How is that relevant to the question?

The revision date of that ftp thing, must be a pretty perfect
perfect program since it hasn't changed for the last seven years :)
 
J

James Kuyper

Keith Thompson wrote:
[...]
The last revision date of what? How is that relevant to the question?

The revision date of that ftp thing, must be a pretty perfect
perfect program since it hasn't changed for the last seven years :)

I doubt it - there's 14 open bug reports and 14 feature requests filed
for yafc, of which 10 and 3, respectively, were opened since the last
release - none of those have been assigned to anybody. So the project
seems to have been abandoned. However, there has been a small amount of
activity on the developers mailing list since that date, a lot of it in
2012, which would seem to contradict that conclusion. Perhaps, if you're
interested, you should investigate.
 
8

88888 Dihedral

Hi, I'm new to C, and i've got files of the project of C, but I don't know that how to the compile all of files. How can I do it?

I think the ANSI C in 1990 reference is a classical
one and the K&R one is helpful, too.

Anyway in C, the concepts about the stack and
the memory manipulations are all vulnerable
to fail in the run time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top