Creating a bash script to compile a c++ -
i have program i've written in c++ outputs simulation results .csv excel file.
according instructions need create simple bash script run .cpp file given command "$ run_program" ($ not part of command).
i've looked on stackoverflow , other sites have not found concrete answer me. appreciate if answer can take time explain parameters mean.
thank you.
how should make bash script run c++ program?
this 1 of links i've looked at, not make heads or tails out of this.
i dont know command using compile c++ program might you.
- create file ".sh" extension , open favorite text editor.
paste code (change compiling line line using compile progam)
#!/bin/bash #run in terminal #+ command compile c++ program. here used common 1 g++ filename.cpp -o anyname exit 0
now need run script, open terminal
chmod u+x scriptname.sh
then run script ./scriptname.sh
compile program.
Comments
Post a Comment