Commands needed

This is a discussion on Commands needed within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Can anyone suggest commands for compiling,linking and running already saved .c files? The text book states the commands: MSC filename.c ...

  1. #1
    Student Forever! bookworm's Avatar
    Join Date
    Apr 2003
    Posts
    132

    Commands needed

    Can anyone suggest commands for compiling,linking and running already saved .c files?
    The text book states the commands:

    MSC filename.c
    link filename.obj
    filename

    But they don't seem to work
    Solutions needed urgently.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,434
    > MSC filename.c
    Tell us which compiler you actually have - this assumes ONE particular compiler.

    For example, depending on where you are
    cc filename.c
    gcc filename.c
    cl filename.c
    tc filename.c

    etc etc
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Student Forever! bookworm's Avatar
    Join Date
    Apr 2003
    Posts
    132
    I use Bloodshed Dev.But I believe it won't work in the DOS mode,right?Of course,I can always get DJGPP.But I'm dead scared of its cryptic maneuvering.
    Waiting for answers by Salem and others.

  4. #4
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    When it comes to compiling and linking, I create the following batch file.

    Code:
    @echo off
    gcc *.c -o whatever.exe

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,434
    > I use Bloodshed Dev.But I believe it won't work in the DOS mode,right?
    Bloodshed is just an IDE in front of the compiler
    All it does it automate the task of compiling files, which if you're really desperate can be compiled from the command line.

    Just look in your devc++/bin directory

    And no, dev-c++ cannot create DOS programs, only win32 console programs.

    DJGPP cannot create DOS programs either (not 16 bit real mode DOS programs). It generates 32 bit protected mode DOS programs.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    I use Bloodshed Dev.But I believe it won't work in the DOS mode,right?Of course,I can always get DJGPP.But I'm dead scared of its cryptic maneuvering.
    Cryptic manuevering? How so? DJGPP is very straightforward and now GAS will also accept Intel syntax assembly language - although I've yet to make it all work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Executing DOS commands from inside an image
    By Moony in forum C Programming
    Replies: 6
    Last Post: 03-16-2008, 12:40 PM
  2. Replies: 2
    Last Post: 07-27-2007, 12:48 PM
  3. Executing system commands cross platform
    By markucd in forum C++ Programming
    Replies: 6
    Last Post: 11-04-2005, 07:56 AM
  4. Disable ALT key commands
    By Lionmane in forum Windows Programming
    Replies: 9
    Last Post: 09-23-2005, 10:41 AM
  5. Bluetooth Dial-up network profile with AT commands
    By BrownB in forum Networking/Device Communication
    Replies: 0
    Last Post: 06-29-2005, 02:47 AM

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