[plug] compiling question

Leon Brooks leon at brooks.fdns.net
Wed Jan 15 22:59:34 WST 2003


On Wednesday 15 January 2003 10:30 pm, Jon Miller wrote:
> I have a few programs that needs to be compiled so I'm told.  some have
> extensions of ".c".  I understand I can issue the following:
> gcc -o nameof executable program.c

I would use at least:

    gcc -Wall -o program program.c

...and probably...

    gcc -Wall -O2 -o program program.c

If the final product is a single program with multiple source files, one 
approach is to list all of the source fiels after -o program, not just one.

> But what and how do I handle the ones with the extensions of ".h"?

You don't. They are include files, read by each of the .c files.

If there is a file called makefile or Makefile, try typing `make' to see what 
happens.

If there is a file called configure, try this sequence:

    ./configure
    make
    make install

Cheers; Leon



More information about the plug mailing list