• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Example Standard XCode projects handlinig command line parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Example Standard XCode projects handlinig command line parameters


  • Subject: Re: Example Standard XCode projects handlinig command line parameters
  • From: "Justin C. Walker" <email@hidden>
  • Date: Fri, 17 Mar 2006 21:40:56 -0800


On Mar 17, 2006, at 21:26 , Keith Hutchison wrote:

I'm writing a small utility to accept parameters like
pgcl -h 192.168.27.97 -p 5432 -u someName -p somePassword -d
someDatabase -s someSQL > someDelimitedResult
to connect to remote postgresql database and run some sql.

I have a command line project working, and I'm currently hardcoding
the variables.

Anyone know of a c and/or a c++ example program/project showing how to
handle command line arguments within an Xcode project?

It's not clear (to me) what you want. Do you want to feed command- line arguments to a command-line tool while you are testing it within Xcode; or do you want to know how to access command-line arguments from within a C/C++ program?


For the former, search the Xcode documentation, or the list archives. If it's the latter, almost any tool, available from the Darwin source site or, say, the FreeBSD or Linux sites, will provide examples. As a start, check the man page for 'getopt()' ("man 3 getopt").

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
When LuteFisk is outlawed,
Only outlaws will have LuteFisk
--------



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Example Standard XCode projects handlinig command line parameters (From: "Keith Hutchison" <email@hidden>)

  • Prev by Date: Example Standard XCode projects handlinig command line parameters
  • Next by Date: Re: GCC 4 and strict aliasing
  • Previous by thread: Example Standard XCode projects handlinig command line parameters
  • Next by thread: Xcode code completion and custom framework
  • Index(es):
    • Date
    • Thread