Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
compiling c programs in suse linux
Results 1 to 4 of 4

Thread: compiling c programs in suse linux

  1. #1

    Question compiling c programs in suse linux

    hai everybody

    I have installed opensuse 10.2 in my laptop.. when I tried to compile c program in it,,, an error message is coming "cc comand not found".... some people are saying that opensuse comes without gcc... at the same time some others are saying that its there . But I can't find it.. moreover.. I am only a beginner in linux.. I don't know anything deeply abt that... so can anyboody help me in this subject.. I am expecting a detailed explanation abt the subject from any of the members..

  2. #2
    Quote Originally Posted by sajeerfazil View Post
    hai everybody

    I have installed opensuse 10.2 in my laptop.. when I tried to compile c program in it,,, an error message is coming "cc comand not found".... some people are saying that opensuse comes without gcc... at the same time some others are saying that its there . But I can't find it.. moreover.. I am only a beginner in linux.. I don't know anything deeply abt that... so can anyboody help me in this subject.. I am expecting a detailed explanation abt the subject from any of the members..


    1. Connect to the net and type "yum install gcc" in a terminal/command prompt window withouts quotes. This will install the open source compiler called the gcc. This can compile c/c++, java, php etc. Restart the pc.

    2. Open up a text editor from the menu there are plenty such as Kwrite etc.

    3. Save this code in it with a file name helloworld.c

    #include < stdio.h>

    void main()
    {
    printf("\nHello World\n");
    }


    4. Make sure you give the extension .c

    5. Now go to any terminal/command prompt of your choice. Type "gcc -o helloworld helloworld.c" without quotes. Then execute the program by typing in the same terminal after the above command "./helloworld.c" without quotes.

    Let me know if this works. Do not lose patience. I am also learning on my own at my own pace. Reply ASAP. Good luck and god bless.

  3. #3
    Member omidkamangar's Avatar
    Join Date
    Mar 2006
    Location
    Kurdistan
    Posts
    239
    Quote Originally Posted by tech291083 View Post
    Then execute the program by typing in the same terminal after the above command "./helloworld.c" without quotes.
    1st- You should run "./helloworld" not "./helloworld.c".
    2nd- When I want to know whether a package is installed or not I use this:
    Code:
    rpm -qa | grep -i package_name
    Where package_name is the name of the package I want. You can replace it with "gcc" to see whether It is installed or not.
    This will be over soon, and then I can ...

  4. #4
    Quote Originally Posted by omidkamangar View Post
    1st- You should run "./helloworld" not "./helloworld.c".
    2nd- When I want to know whether a package is installed or not I use this:
    Code:
    rpm -qa | grep -i package_name
    Where package_name is the name of the package I want. You can replace it with "gcc" to see whether It is installed or not.
    Sorry my apolozies....

    Thanks omidkamangar...........

Similar Threads

  1. Do linux programs leave behind baggage?
    By sabkuchindia in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 04-16-2009, 07:41 AM
  2. Compiling BASIC programs on Linux
    By tech291083 in forum Redhat / Fedora
    Replies: 2
    Last Post: 10-20-2007, 09:13 AM
  3. Compiling C++ programs on Red Hat 8.0
    By sampathks in forum Linux - Software, Applications & Programming
    Replies: 8
    Last Post: 09-18-2003, 05:43 PM
  4. installing programs in linux
    By Dswissmiss in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 09-21-2002, 05:55 AM
  5. Genealogy programs for Linux?
    By papanohair in forum Linux - General Topics
    Replies: 9
    Last Post: 02-27-2002, 11:32 AM

Bookmarks

Posting Permissions

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