g++ script
This script takes a filename without an extension, compiles it with g++ and returns an executable with the same filename but with the .exe extension for reference only -- has nothing to do with Windows.
There really isn't anything fancy other than shortening something I do very often.
#!/bin/bash
if [[ "${1}" == "" || "${1}" == "-h" || "${1}" == "--help" ]]; then
echo "
Usage: mygcc <name of C++ source file without extension>
Source file should have the extension of .C only.
This will output a file called: <C++ source file name>.exe
I've used .exe just so that you know it's an executable file.
It has nothing to do with Windows. ;)
"
exit 1;
fi
g++ ${1}.C -o ${1}.exe
[Click to add or edit comments])
Please prepend comments below including a date