|
Documentation · Runtime Library Reference · IDDE Reference · Change Log · FAQ Downloads · D compiler · DMDScript compiler · MicroEmacs · MTask Community · News Groups · Archives · Bookshelf · Features · Contact · Friends · Related Sites · Acknowledgements · Consultants · Site Map · Walter Bright · Empire |
Frequently Asked Questions
Can I get it on CD?
Where's the debugger?
Where's the IDDE?
What's the version of the compiler?
\dm\bin\scppnat the command prompt. 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?
lib\sdx.lod lib\cx.obj src\dos32\cx.asm src\dos32\lib\x386.libinto the same directories and then you can develop for DOSX again. 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?
e.g. If you want to define 'NDEBUG' only, specify only 'NDEBUG'. If in addition, you want to specify -Ab, you must write: -Ab -DNDEBUG Redefined type errors when including the socket header files
The solution is to #define _WIN32_WINNT 0x0400 in order to force windows.h to include winsock2.h, not winsock.h. I'm getting a message about SCT3D32.DLL not installed
"This application uses SCT3D32.DLL, which has not been correctly installed."This message is generated by SCT3D32.DLL itself (a Microsoft supplied DLL), and is produced when it is not residing in the system directory. SCT3D32.DLL is in the \dm\bin directory. Copy it to your windows system directory (which on NT is \winnt40\system32), and rename the one in \dm\bin to SCT3D32.DLL.OLD. This is the only known DLL with this problem. How do I work with old CodeView?The problem:Compiling a test program like this,dmc -ms -0 -g -L/co/ma foo.cand proceeding to load CodeView in "real" DOS produces the message: CV0104 Warning: CodeView information for 'D:\FOO.EXE' is newer than this version of CodeViewThe version of codeview is 4.01 as supplied in the MASM 6.11 package, dated from 1992. Using /cvversion:4 to the linker produces the same result, as well as using compiler option -g4. Using masm to assemble an example program and linking using Microsoft Link does work with codeview. Linking the same .obj file with optlink/cvversion:4 produces the same failure. The solution:Optlink runs cvpack when generating cv4 info. This seems to be the cause of the trouble: cv only gives the "info is newer than this version of codeview" error when cvpack is executed without any options. When optlink is given the /nocvpack option, then run cvpack manually with the minimal option, the debugger (cv) then reports with symbolic names. For example:dmc -ms -0 -g -L/co/l/i/nocv foo.exe cvpack /minimal foo.exeand cv will work. (Thanks to Jack Jay for tracking this down.) I need an import library for a Windows system DLL
#include <windows.h>
void main()
{
gethostbyname(0);
}
The function gethostbyname() is declared in \dm\include\win32\winsock.h,
and is exported from the Windows system dLL wsock32.dll. Compiling and
linking test.c produces:
E:>dmc test link test,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved test.obj(test) Error 42: Symbol Undefined _gethostbyname@4 --- errorlevel 1 E:>If implib is run over wsock32.dll to create wsock32.lib, it still doesn't link because the name in wsock32.dll is gethostbyname, not _gethostbyname@4. The solution is to create a module definition file wsock32.def with the contents: LIBRARY wsock32
EXETYPE NT
SUBSYSTEM WINDOWS
EXPORTS
_gethostbyname@4 = gethostbyname
This establishes a translation from one name to the other.
Add each of the exports needed.
Then run implib over it with:
implib wsock32.lib wsock32.defand link with: dmc test.obj wsock32.liband it should then link successfully. ClassExpress crashes reading resources created by VC++
Replace the numbers with the correct resource ID defines from "resource.h". (Thanks to Andrew Corkan for tracking this down.) IDDE sometimes can't find files, shows paths wrong?
\program files\dev\dm (note
embedded space between "program" and "files"). The solution is
to (1) use paths that don't embed spaces or (2) use the subst
command, i.e. subst z: \program files\dev and then
refer to the files as being off of z: in the IDDE.
(Thanks to Chris Widdows and Jan Knepper for tracking this down.) I need winfax.h or some other new Win SDK header file.
Resource Editor crashes under Windows ME?
(Thanks to Laurentiu Pancescu for tracking this down.) How do I use DirectX with DMC?
(Thanks to Nic Tiger.) Why can't I create a workspace in the IDDE?
(Thanks to Frank Albe.) 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:
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 failedIf 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 CONSOLEDo 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.
How do I stop the console window from appearing?Add these lines to the module definition file (.def):EXETYPE NT SUBSYSTEM WINDOWSor 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.0or add the linker flag -L/exet:nt/su:windows:4.0. |