Find the answer to your Linux question:
Results 1 to 2 of 2
I am new to C and have struggled to compile c programs using the ./ (e.g. ./Hello). Is there any other way where I can compile my programs without using ...
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    1

    C compiler

    I am new to C and have struggled to compile c programs using the ./
    (e.g. ./Hello). Is there any other way where I can compile my programs without using the ./ ? I 'll be very greatful for this help.

  2. #2
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    "./" will not compile a C program, it tells the computer to run the program from the current directory. If you want to compile, use gcc filename.c, if compilation is successful then you will have an object file ready to be run, probably named a.out. You can then run the program with ./a.out.

Posting Permissions

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