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