www.digitalmars.com                  
Last update Wed May 12 16:51:51 2010

Frequently Asked Questions


Can I get it on CD?


Where's the debugger?


Where's the IDDE?


What's the version of the compiler?


When I click on it, a window flashes and disappears?


The compiler gives me an error when accessing a base class?

With the code:
template <class T> struct Base
{
      int m_member;
};

template <class T> struct Derived : public Base<T>
{
      Derived() : m_member(0)
      {
      }
};
the compiler gives an error that the m_member or any other members of Base<T> are not found. Although other compilers accept such code, it is incorrect according to the C++98 Standard 14.6.2-2 and 14.6.2.1-1. Base<T> is a dependent type, and so it is not in scope for template class Derived.

Can I download the documentation in one zip file?


Is DOSX still available?


Does the WDOSX (Wuschel's DOS eXtender) work with DMC?


Is the Zed editor still available?


Will the compiler run under DOS?


How do I specify other compiler flags to the IDDE?


Redefined type errors when including the socket header files


I'm getting a message about SCT3D32.DLL not installed


How do I work with old CodeView?


I need an import library for a Windows system DLL


ClassExpress crashes reading resources created by VC++


IDDE sometimes can't find files, shows paths wrong?


I need winfax.h or some other new Win SDK header file.


Resource Editor crashes under Windows ME?


How do I use DirectX with DMC?


Why can't I create a workspace in the IDDE?


The IDDE doesn't seem to work with spaces in filenames


When I run the compiler, it just flashes on the screen and disappears?

The free downloadable compiler is a console program. That means it needs to be run from within a console window. To start a console for Windows XP, click on [Command Prompt] from the [start] menu. The GUI version of the compiler comes with the Development System.

What is the sc command?

The sc and dmc commands are identical.

Where is the header file <iostream>?

iostream is part of STLport. It comes with the Development System. It is also available as a separate download. (If the \dm\stlport directory is not there, you'll need to download it.) Do one of the following: For more information, see \dm\stlport\readme.txt.

I get 'Symbol Undefined _WinMain@16'?

When linking a program as a GUI application, but having a main() like a console application, results in the error message from the linker:
link /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304 /A:512
@tst.LNK
Error: c:\dm\lib\SNN.lib(winstart)  : Symbol Undefined _WinMain@16
Errors: 1  Warnings: 0
Build failed
If using the IDDE, this is corrected by selecting [Console] under [Target Type] in the first [Tab] of [Project Settings].

If using a module definition (.def) file, these lines should appear in it:

EXETYPE          NT
SUBSYSTEM        CONSOLE
Do not use /ENTRY:WinMainCRTStartup in a command to the linker, this specifies a Windows application.

I am getting an incomprehensible error message when compiling.

The syntax and semantics of C++ can be convoluted, and when the compiler encounters an error, it makes a guess at what might have gone wrong and issues an error message. If the construct being compiled is the result of layers of macros, template expansions, typedefs, etc., it can sometimes not be at all clear what is going wrong. When all else fails, here are some techniques for isolating down what the problem is. At each step, verify that the error message continues to be generated.
  1. Redirect the output of the makefile to a .bat file:
    make -ffoo.mak >cc.bat
    
  2. Edit cc.bat so it is just compiling the source file that fails.
  3. Rename the source file that fails to test.cpp, and edit cc.bat so it is compiling test.cpp.
  4. Remove any precompiled header switches from cc.bat.
  5. Ruthlessly hack off chunks of test.cpp until the smallest source file remains that still shows the error.
  6. Many projects #include a complicated, confusing mass header files from multiple locations. These header files will also be commonly filled with macros and #if's, making it really hard to be sure what is going on in them. Add the -e and -l switches to cc.bat, which will produce a file called test.lst. This file will have all the #include files included, and all macros will be expanded, and all false conditional code will be removed. Rename test.lst to test.cpp, and continue hacking and slashing off all the code that does not contribute to the error message.
Experience shows nearly all such problems can be thusly reduced to maybe 10 lines of code or less. These 10 lines of code usually make it obvious what is going wrong, and what a suitable fix or workaround could be. Failing that, the code can be posted to the Digital Mars news groups where many people can help. (Far more people are willing to help when the problem is shortened like this, few will offer to help if it somewhere in a megabyte of source.) If the result appears to be a problem with the compiler, see bug reports.

How do I stop the console window from appearing?

Add these lines to the module definition file (.def):
EXETYPE       NT
SUBSYSTEM     WINDOWS
or add the linker flag -L/exet:nt/su:windows.

A strange extra line is displayed under the menu bar?

This occurs on Windows XP systems running in the standard XP style UI. It does not occur on Win 2K, or XP in "classic" mode. The solution is to make sure the following lines are in the module definition file:
EXETYPE NT
SUBSYSTEM WINDOWS,4.0

or add the linker flag -L/exet:nt/su:windows:4.0.