Brosef
Brosef

Reputation: 3095

Sending arguments from terminal to xcode

I'm trying to send two arguments to Xcode through terminal. I've watched some tutorials that had the following steps:

  1. Change the directory by typing cd followed by the path of the folder containing the program files.
  2. gcc main.c -o randomProgramName
  3. ./prog argument1 argument2

My file is a .m file, but replacing the .c the examples uses with a .m doesn't work. I feel like I'm way off. I also installed the command line tools, hoping it would work, but no dice.

Upvotes: 0

Views: 534

Answers (1)

Tyler Eich
Tyler Eich

Reputation: 4248

If you're running a program in Xcode and want to send arguments to it, there's a StackOverflow question to help you out.

If you want to send arguments to a compiled Objective-C program in Terminal, here's another StackOverflow question to help with that.

Upvotes: 1

Related Questions