PDA

View Full Version : Commands needed



bookworm
11-08-2003, 04:27 AM
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.

Salem
11-08-2003, 05:51 AM
> 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

bookworm
11-15-2003, 08:09 AM
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.

Frobozz
11-15-2003, 09:35 PM
When it comes to compiling and linking, I create the following batch file.


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

Salem
11-16-2003, 02:32 AM
> 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.

VirtualAce
11-16-2003, 04:50 PM
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.