Results 1 to 3 of 3

Thread: gcc flag question

  1. #1
    Just burned his ISO
    Join Date
    Sep 2008
    Posts
    8

    Default gcc flag question

    What does the -o flag do with gcc?

    Example:

    gcc -o cpom file.c



    Thanks

  2. #2
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default

    See if the following help:

    http://linuxreviews.org/howtos/compiling/

    http://www.shlomifish.org/lecture/W2...gcc/flags.html

    http://linux.die.net/man/1/gcc

    Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function.
    With -O, the compiler tries to reduce code size and execution time, without performing any optimizations that take a great deal of compilation time.
    To be successful here you should read all of the following.
    ForumRules
    ForumFAQ
    If you are new to Back|Track
    Back|Track Wiki
    Failure to do so will probably get your threads deleted or worse.

  3. #3
    Member
    Join Date
    Apr 2007
    Posts
    155

    Default

    Uhm the -O is for Optimize, the -o is for output file... your example code is saying gcc write the compiled file.c out to cpom.

    Next time check the man pages.
    This is a hackers forum :P
    root ~# aircrack-ng pwnd-01.cap
    Lenovo Thinkpad R500, OS: Ubuntu 8.10, BackTrack3, Windows XP (VirtualBox), Windows Vista, Windows 7 beta

Posting Permissions

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