a.exe

This is a discussion on a.exe within the C Programming forums, part of the General Programming Boards category; I'm trying to run programs from the command line for once. I'm using MinGW. When I compile it using gcc ...

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    55

    a.exe

    I'm trying to run programs from the command line for once. I'm using MinGW. When I compile it using gcc it creates an executable named "a". I was wondering how to specify what the name of the .exe beforehand.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,817
    Do something like:
    Code:
    gcc -o programname.exe sourcefile.c
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Installing Wireless Drivers In Linux
    By mike_g in forum Tech Board
    Replies: 1
    Last Post: 12-05-2007, 04:53 AM
  2. How to add a Icon to my C (a.exe) program
    By ashok449 in forum C Programming
    Replies: 1
    Last Post: 11-16-2007, 01:58 AM
  3. File reading/writing question
    By Rider in forum C++ Programming
    Replies: 26
    Last Post: 12-23-2006, 04:27 AM
  4. Running My Program
    By Jeff in forum C Programming
    Replies: 27
    Last Post: 09-02-2004, 05:50 PM
  5. Questions on Speed of Execution
    By wavering in forum C Programming
    Replies: 22
    Last Post: 01-20-2002, 01:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21