Run Terminal Command in Xcode

Hello All,


I am a new XCode user and I am using it for compiling c++ CMake projects. I am able to compile the project but to run I need to call in an external binary or run a command in terminal, "argos3 -c experiments/diffusion10.argos". "argos3" is an external robotics program (www.argos-sim.info), "-c" tag to run an experiment in Argos and "experiment/diffusion10.argos" is the location and XML file to run Argos. I can run them using terminal but cannot do it through Xcode Version 9.2 (9C40b).


I also tried creating scheme and choosing external executable (terminal and argos) with arguments passed during launch.


Please help me out as this out make my life so much easier.

Currently using QtCreator.


Sincere Regards

Jayam Patel

Have you looked at adding a pre-action script in the Run and/or Test phases of your scheme? If you need to have the simulator running when you run or test your target, you could have the pre-action script start it up and put it in the background just prior to starting your run or test. Alternatively, you could just bring up a terminal window, and run it in that just before you start your test or run.

Yes, I tried doing that. Both through Build Phases and under Schemes by creating Post-Run/Post-Build Scripts. Neither of the tries worked for me.

Anyways, I think this will not work as I will have to change the CMake for the project to access the shared object file to run even through the terminal.

Thank you so much for taking time out and replying to my issue.


Regards

Jayam Patel

Run Terminal Command in Xcode
 
 
Q