Re: Compiling simple old UNIX program
- From: "vze35xda@xxxxxxxxxxx" <vze35xda@xxxxxxxxxxx>
- Date: 20 Jul 2005 19:47:56 -0700
(1) atoi() You need to use strotol() instead. Replace atoi(argv[++])
with strotol(argv[++],NULL,0). You will probably need to add #include
<stdlib.h> and #include <limits.h> at the top of the file.
(2) system() You didn't say is this to be compiled on an OS X system
or OS 8,9 system ? If OS 8 or 9 you have a problem because
system(command) means run "command" on the command line and systems 8,9
didn't have one so this won't work and you will have to figure out some
other way to do it.
If OS X then it should work and the #include <stdlib.h> should make it
happy. If this doesn't work you have some alternatives. First if you
have the development tools installed you might be able to type cc <your
app>.c on the command line of Terminal and it might just compile and
build a.out which would run. If not XCode building a standard tool
stationary project would probably work just fine (with the above atoi
fix done).
.
- Follow-Ups:
- Re: Compiling simple old UNIX program
- From: Carl Barron
- Re: Compiling simple old UNIX program
- References:
- Compiling simple old UNIX program
- From: Bint
- Compiling simple old UNIX program
- Prev by Date: Re: Compiling simple old UNIX program
- Next by Date: Re: CW inline assembly and Rosetta
- Previous by thread: Re: Compiling simple old UNIX program
- Next by thread: Re: Compiling simple old UNIX program
- Index(es):
Relevant Pages
|