Friday, February 10, 2012

Script - Updated

I just updated my "cal" script (which stands for Compile And Link) for deleting the .o file and the executable just before doing everything.

rm SourceCode.o
rm executableecho "Compiling the C++ source code..."
g++ -Wall -c SourceCode.cpp
echo "Compilation done"
echo "Now linking..."
g++ -o Executable SourceCode.o
echo "Done"

And here's the most compact version of the script:

rm executable
echo "Compiling, Linking and preparing the C++ source code for debugging..."
g++ -Wall -g -o executable SourceCode.cpp
echo "Done"

Now the compiler compiles, links and prepares the C++ source code for debugging. There's no .o file create by the compiler using this last script.

No comments:

Post a Comment