Find the answer to your Linux question:
Results 1 to 2 of 2
I downloaded a few files that end in .c I'm assuming they are C scripts? How would I run these? what command would I need to give? thanks...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2003
    Posts
    5

    How do you compile?


    I downloaded a few files that end in .c
    I'm assuming they are C scripts? How would I run these? what command would I need to give?

    thanks

  2. #2
    Linux User
    Join Date
    Feb 2003
    Location
    Norway, Asker
    Posts
    267
    Code:
    gcc -o binaryfile sourcecode.c
    or,
    Code:
    gcc sourcecodefile.c
    then the binary file will be named a.aout

    To run the files, either specify the full path to the file, f.x. /home/user/a.out or ./a.out

    If you need somewhat more advanced method's, check with man gcc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •