Setting up the DMC C/C++ Compiler
Posted: Wed Nov 06, 2013 5:56 am
To setup the DMC C/C++ compiler just do the following:
1) Download the DM C/C++ compiler zip file from this location.
To use thinks like <iostream> and other STL features remember to also download STL port from the same link.
2) Open the zip file and unpack the DM folder contained to some disk location, for example:
The DM bin folder will also need to be added to the PATH environment variable.
Details on how to do this can be found here.
3) Start Zeus and to test the PATH change from above use the Tools, DOS Command Line menu and run this command:
If the bin folder is in the PATH you should see this output inside Zeus:
4) Use the Options, Document Types menu to edit the C/C++ Document Type adding in this command line to the Compiler section:
That command line will compile and link the current file.
5) Create a simple test.cpp file as follows:
6) Use the Compiler, Compile menu to compile and link this file.
7) Using the Macros, Execute 'test.exe' menu to run the resulting executable should produce this output:
1) Download the DM C/C++ compiler zip file from this location.
To use thinks like <iostream> and other STL features remember to also download STL port from the same link.
2) Open the zip file and unpack the DM folder contained to some disk location, for example:
Code: Select all
C:\Program Files\dm
Code: Select all
C:\Program Files\dm\bin
3) Start Zeus and to test the PATH change from above use the Tools, DOS Command Line menu and run this command:
Code: Select all
dmc.exe
Code: Select all
Digital Mars Compiler Version 8.42n
Copyright (C) Digital Mars 2000-2004. All Rights Reserved.
Written by Walter Bright www.digitalmars.com/ctg/sc.html
DMC is a one-step program to compile and link C++, C and ASM files.
Usage ([] means optional, ... means zero or more):
DMC file... [flags...] [@respfile]
file... .CPP, .C or .ASM source, .OBJ object or .LIB library file name
....
Code: Select all
dmc.exe "$fn"
5) Create a simple test.cpp file as follows:
Code: Select all
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello DMC World!");
return 1;
}
7) Using the Macros, Execute 'test.exe' menu to run the resulting executable should produce this output:
Cheers JussiHello DMC World!