Find the answer to your Linux question:
Results 1 to 3 of 3
hai every body i hav installed opensuse 10.2 in my laptop... but i can't compile c programs ... when i try to compile there appeared an error message that "cc ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    1

    Question compiling c programs in suse linux


    hai every body

    i hav installed opensuse 10.2 in my laptop... but i can't compile c programs ... when i try to compile there appeared an error message that "cc comand not found". wats the problem with that.. some people are sayin that suse comes without gcc,.. some are saying that its there... if its there, how can i comile the program.. if its not there what should I do? please help me....

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi fazilsajeer,

    Welcome to the LinuxForums,

    use 'gcc' or 'gcc++' to compile C/C++ programs.
    Code:
    gcc hello.c
    ./a.out
    if you get 'command not found' error again, install 'gcc' through Yast, software management. its available in Installation CD/DVD.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Linux Engineer valemon's Avatar
    Join Date
    Oct 2006
    Location
    Volos
    Posts
    934
    also
    Code:
    gcc filethatcontainscode.c -o thenameoftheexecutable 
    ./nameoftheexecutable
    Linux is like a Teepee, No Windows, No Gates, Only Apache Inside!
    Arch Linux
    Linux user #442041

Posting Permissions

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