Skip to content

aadityanaik/compile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compile

A simple rudimentary bash script to compile single (or compile and link multiple) C and CPP source files as opposed to the normal

$ gcc -c <filename>.c -o <filename>.o

$ gcc <filename>.o -o <executable name>

Installation

Clone the repository into a local directory
Change directories to the clone
Run the install.sh file as root $ sudo sh install.sh

Uninstallation

Change directories to the clone
Run the uninstall.sh file as root $ sudo sh uninstall.sh

Usage

For C or C++ source files:
$ compile <filename with extension>

For programs with multiple .cpp, .c or .C source files:
$ compile -m
You will then be prompted to enter the name of the executable file if all compilations are successful

For compiling multiple standalone files (either .c or .cpp or .C):
$ compile <file1> <file2> <file3>...
Each file will be compiled to generate executables of the same name.

Note

It is imperative to enter the file name with the extension. Otherwise the script will return an error.

About

A simple rudimentary bash script to compile single C and CPP source files more conveniently

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages