ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi. I have never done unix systems programming before... I am using c but I don't know how to get it to run. I have done shell programming a few days ago... so I am not sure how to get started. I basically typed up a simple hello message in c in a text editor in unix. I did a "chmod u+x t" and a "./t" when it runs it gives me an error about my "int main()" Does somebody know what i am doing wrong? Thanks!
They are indeed ... there is no such thing as
"a Unix program" ... it's either source (which needs
to be compiled on the target platform [yes, I know
there's C interpreters, but that's not the point of this])
or a script (which is interpreted on the fly, e.g. a
bash- or perl-script [yes, I know that there are
perl compilers, but that's not the point of this])
By "creating a Unix program" you could mean
writing source code of some sort or the process
of compiling some source ...
i'll give you an example to help you... I have to write a unix program that searches the specified key word and replaces each occurrence of the key word in the file with the specified new word. The key word, the new word, and the file name must be given as arguments. So I was thinking that it would be like "search word filename" as the command... not telling me how to do it.. could you just tell me how I would compile and run it... also I have to write it in the C language. Thanks!