how to compile?


Results 1 to 11 of 11

Thread: how to compile?

  1. #1
    Join Date
    Aug 2002
    Location
    europe
    Posts
    520

    Question how to compile?

    hi!
    how do i compile a *.c file name ie monitor.c?
    i open it with the editor, write a source code in it but my problem is:
    what do i have to enter in the console to compile and run the program written?

    thanks bye threadhead

  2. #2
    Join Date
    May 2001
    Posts
    20

    RTFM

    The M that you need to FR is

    Code:
    man gcc
    the command is

    > gcc -o executablename whatever.c

    for c++ it's

    > g++ -o executablename whatever.cpp

    have fun...
    ------------
    "One World, One web, One Program"
    - Microsoft

    "Ein Volk, Ein Reich, Ein Fuhrer"

    - Hitler

  3. #3
    Join Date
    Aug 2002
    Location
    europe
    Posts
    520
    when i type:

    man gcc linux replies with 'there is no existing manual entry for gcc'

    do you know where i can get such entry?

    thanks bye threadhead

  4. #4
    Dun'kalis Guest
    You need to install GCC. What distro are you using?

  5. #5
    Join Date
    Jul 2002
    Posts
    720
    You may like to do a "cc" without quotes too.
    cc -- ansi C Compiler driver
    gcc -- GNU C Compiler

  6. #6
    Join Date
    Aug 2002
    Location
    europe
    Posts
    520
    i am using the suse 8.0 professional distribution.

    thanks for the help buw how do i install the gcc?
    from cd?

  7. #7
    Join Date
    Apr 1999
    Location
    Toronto
    Posts
    6,707
    You would install it with rpm: rpm -Uvh filename.rpm

  8. #8
    Join Date
    Aug 2002
    Location
    europe
    Posts
    520
    ok that sounds good
    do you know where i can get this for suse 8.0?

    bye threadhead

  9. #9
    Join Date
    May 2001
    Posts
    20
    Read the SuSE manual, the part that talks about installing software with YaST or YaST2. B/c suse has many cd's rpm does not really work.
    ------------
    "One World, One web, One Program"
    - Microsoft

    "Ein Volk, Ein Reich, Ein Fuhrer"

    - Hitler

  10. #10
    Join Date
    Dec 2000
    Location
    Glasgow, Scotland
    Posts
    4,361
    tar -zxvf <filename>
    cd /path/to/files
    ./configure
    make
    make install


    Hold on! It's a proper compiling question. Cool

    mrBen "Carpe Aptenodytes"

    Linux User #216794

    My blog page

    3rd year running - get yourself to LugRadio Live 7th-8th July 2007, Wolverhampton, UK. The premier FLOSS community event.

  11. #11
    Join Date
    Aug 2002
    Location
    europe
    Posts
    520
    kinda proper
    thanks for all the help dudes!

    bye threadhead

Posting Permissions

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