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.

  1. create file ".sh" extension , open favorite text editor.
  2. 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 
  3. now need run script, open terminal

    chmod u+x scriptname.sh

then run script ./scriptname.sh compile program.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -