www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - 'dmd' is not recognized as an internal or external command

reply "Capture_A_Lag" <bla bla.bla> writes:
Hi all!
I am new to D language and I have a problem with compiler.

I have Windows 8.1 64bit.
I installed DMD 2.065 compiler and Visual D for Visual Studio 
2013 Ultimate.
So when I create an empty(Hello D-World) project and try to 
compile it, I get this error: "'dmd' is not recognized as an 
internal or external command,
operable program or batch file.".
I added "dm\bin" and "dmd2\windows\bin" to PATH environment 
variable.


Here is a full build log:

____________________________________________________
____________________________________________________
Build Log

Building Debug\D_TEST.exe

Command Line

set PATH=D:\Developing\Visual Studio 
2013\VisualD\D\dm\windows\\bin;C:\Program Files (x86)\Windows 
Kits\8.1\\\bin;%PATH%
dmd -g -debug -X -Xf"Debug\D_TEST.json" -deps="Debug\D_TEST.dep" 
-c -of"Debug\D_TEST.obj" main.d
if errorlevel 1 goto reportError

set LIB=
echo. > Debug\D_TEST.build.lnkarg
echo 
"Debug\D_TEST.obj","Debug\D_TEST.exe_cv","Debug\D_TEST.map",user32.lib+ 
 Debug\D_TEST.build.lnkarg
echo kernel32.lib/NOMAP/CO/NOI >> Debug\D_TEST.build.lnkarg "D:\Developing\DIGITAL MARS\VisualD\pipedmd.exe" -deps Debug\D_TEST.lnkdep link.exe Debug\D_TEST.build.lnkarg if errorlevel 1 goto reportError if not exist "Debug\D_TEST.exe_cv" (echo "Debug\D_TEST.exe_cv" not created! && goto reportError) echo Converting debug information... "D:\Developing\DIGITAL MARS\VisualD\cv2pdb\cv2pdb.exe" "Debug\D_TEST.exe_cv" "Debug\D_TEST.exe" if errorlevel 1 goto reportError if not exist "Debug\D_TEST.exe" (echo "Debug\D_TEST.exe" not created! && goto reportError) goto noError :reportError echo Building Debug\D_TEST.exe failed! :noError Output 'dmd' is not recognized as an internal or external command, operable program or batch file. Building Debug\D_TEST.exe failed! ____________________________________________________ ____________________________________________________ Please help me! I do really want to write programs on D!
Apr 14 2014
next sibling parent "Alexandre L." <alex.cs00 yahoo.ca> writes:
Any reasons for the Double anti slashes ?
D:\Developing\Visual Studio 2013\VisualD\D\dm\windows\\bin
                                                       ^

On Monday, 14 April 2014 at 20:29:17 UTC, Capture_A_Lag wrote:
 Hi all!
 I am new to D language and I have a problem with compiler.

 I have Windows 8.1 64bit.
 I installed DMD 2.065 compiler and Visual D for Visual Studio 
 2013 Ultimate.
 So when I create an empty(Hello D-World) project and try to 
 compile it, I get this error: "'dmd' is not recognized as an 
 internal or external command,
 operable program or batch file.".
 I added "dm\bin" and "dmd2\windows\bin" to PATH environment 
 variable.


 Here is a full build log:

 ____________________________________________________
 ____________________________________________________
 Build Log

 Building Debug\D_TEST.exe

 Command Line

 set PATH=D:\Developing\Visual Studio 
 2013\VisualD\D\dm\windows\\bin;C:\Program Files (x86)\Windows 
 Kits\8.1\\\bin;%PATH%
 dmd -g -debug -X -Xf"Debug\D_TEST.json" 
 -deps="Debug\D_TEST.dep" -c -of"Debug\D_TEST.obj" main.d
 if errorlevel 1 goto reportError

 set LIB=
 echo. > Debug\D_TEST.build.lnkarg
 echo 
 "Debug\D_TEST.obj","Debug\D_TEST.exe_cv","Debug\D_TEST.map",user32.lib+
 Debug\D_TEST.build.lnkarg
echo kernel32.lib/NOMAP/CO/NOI >> Debug\D_TEST.build.lnkarg "D:\Developing\DIGITAL MARS\VisualD\pipedmd.exe" -deps Debug\D_TEST.lnkdep link.exe Debug\D_TEST.build.lnkarg if errorlevel 1 goto reportError if not exist "Debug\D_TEST.exe_cv" (echo "Debug\D_TEST.exe_cv" not created! && goto reportError) echo Converting debug information... "D:\Developing\DIGITAL MARS\VisualD\cv2pdb\cv2pdb.exe" "Debug\D_TEST.exe_cv" "Debug\D_TEST.exe" if errorlevel 1 goto reportError if not exist "Debug\D_TEST.exe" (echo "Debug\D_TEST.exe" not created! && goto reportError) goto noError :reportError echo Building Debug\D_TEST.exe failed! :noError Output 'dmd' is not recognized as an internal or external command, operable program or batch file. Building Debug\D_TEST.exe failed! ____________________________________________________ ____________________________________________________ Please help me! I do really want to write programs on D!
Apr 14 2014
prev sibling next sibling parent Paulo Pinto <pjmlp progtools.org> writes:
Hi,

try to set your path like this,

set PATH="D:\Developing\Visual Studio 
2013\VisualD\D\dm\windows\bin";"C:\Program Files (x86)\Windows 
Kits\8.1\bin";%PATH%

You need quotes around paths with spaces and Windows does not like 
multiple separators.

But I am missing the path to dmc as well. Have you installed it?

--
Paulo


Am 14.04.2014 22:29, schrieb Capture_A_Lag:
 Hi all!
 I am new to D language and I have a problem with compiler.

 I have Windows 8.1 64bit.
 I installed DMD 2.065 compiler and Visual D for Visual Studio 2013
 Ultimate.
 So when I create an empty(Hello D-World) project and try to compile it,
 I get this error: "'dmd' is not recognized as an internal or external
 command,
 operable program or batch file.".
 I added "dm\bin" and "dmd2\windows\bin" to PATH environment variable.


 Here is a full build log:

 ____________________________________________________
 ____________________________________________________
 Build Log

 Building Debug\D_TEST.exe

 Command Line

 set PATH=D:\Developing\Visual Studio
 2013\VisualD\D\dm\windows\\bin;C:\Program Files (x86)\Windows
 Kits\8.1\\\bin;%PATH%
 dmd -g -debug -X -Xf"Debug\D_TEST.json" -deps="Debug\D_TEST.dep" -c
 -of"Debug\D_TEST.obj" main.d
 if errorlevel 1 goto reportError

 set LIB=
 echo. > Debug\D_TEST.build.lnkarg
 echo
 "Debug\D_TEST.obj","Debug\D_TEST.exe_cv","Debug\D_TEST.map",user32.lib+
  >> Debug\D_TEST.build.lnkarg
 echo kernel32.lib/NOMAP/CO/NOI >> Debug\D_TEST.build.lnkarg

 "D:\Developing\DIGITAL MARS\VisualD\pipedmd.exe" -deps
 Debug\D_TEST.lnkdep link.exe  Debug\D_TEST.build.lnkarg
 if errorlevel 1 goto reportError
 if not exist "Debug\D_TEST.exe_cv" (echo "Debug\D_TEST.exe_cv" not
 created! && goto reportError)
 echo Converting debug information...
 "D:\Developing\DIGITAL MARS\VisualD\cv2pdb\cv2pdb.exe"
 "Debug\D_TEST.exe_cv" "Debug\D_TEST.exe"
 if errorlevel 1 goto reportError
 if not exist "Debug\D_TEST.exe" (echo "Debug\D_TEST.exe" not created! &&
 goto reportError)

 goto noError

 :reportError
 echo Building Debug\D_TEST.exe failed!

 :noError
 Output

 'dmd' is not recognized as an internal or external command,
 operable program or batch file.
 Building Debug\D_TEST.exe failed!
 ____________________________________________________
 ____________________________________________________

 Please help me!
 I do really want to write programs on D!
Apr 14 2014
prev sibling parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 14.04.2014 22:29, Capture_A_Lag wrote:
 Hi all!
 I am new to D language and I have a problem with compiler.

 I have Windows 8.1 64bit.
 I installed DMD 2.065 compiler and Visual D for Visual Studio 2013
 Ultimate.
 So when I create an empty(Hello D-World) project and try to compile it,
 I get this error: "'dmd' is not recognized as an internal or external
 command,
 operable program or batch file.".
 I added "dm\bin" and "dmd2\windows\bin" to PATH environment variable.


 Here is a full build log:

 ____________________________________________________
 ____________________________________________________
 Build Log

 Building Debug\D_TEST.exe

 Command Line

 set PATH=D:\Developing\Visual Studio
 2013\VisualD\D\dm\windows\\bin;C:\Program Files (x86)\Windows
 Kits\8.1\\\bin;%PATH%
 dmd -g -debug -X -Xf"Debug\D_TEST.json" -deps="Debug\D_TEST.dep" -c
 -of"Debug\D_TEST.obj" main.d
 if errorlevel 1 goto reportError

 set LIB=
 echo. > Debug\D_TEST.build.lnkarg
 echo
 "Debug\D_TEST.obj","Debug\D_TEST.exe_cv","Debug\D_TEST.map",user32.lib+
  >> Debug\D_TEST.build.lnkarg
 echo kernel32.lib/NOMAP/CO/NOI >> Debug\D_TEST.build.lnkarg

 "D:\Developing\DIGITAL MARS\VisualD\pipedmd.exe" -deps
 Debug\D_TEST.lnkdep link.exe  Debug\D_TEST.build.lnkarg
 if errorlevel 1 goto reportError
 if not exist "Debug\D_TEST.exe_cv" (echo "Debug\D_TEST.exe_cv" not
 created! && goto reportError)
 echo Converting debug information...
 "D:\Developing\DIGITAL MARS\VisualD\cv2pdb\cv2pdb.exe"
 "Debug\D_TEST.exe_cv" "Debug\D_TEST.exe"
 if errorlevel 1 goto reportError
 if not exist "Debug\D_TEST.exe" (echo "Debug\D_TEST.exe" not created! &&
 goto reportError)

 goto noError

 :reportError
 echo Building Debug\D_TEST.exe failed!

 :noError
 Output

 'dmd' is not recognized as an internal or external command,
 operable program or batch file.
 Building Debug\D_TEST.exe failed!
 ____________________________________________________
 ____________________________________________________

 Please help me!
 I do really want to write programs on D!
I guess the dmd installation path configured in Visual D is not correct: go to Tool->Options->Projects and Solutions->Visual D Settings->DMD Directories and check the "DMD Installation path". This must be the absolute path of the folder that contains the "windows" subfolder. Guessing from your build log, if "D:\Developing\DIGITAL MARS\dmd2\windows\bin\dmd.exe" exists, it should be D:\Developing\DIGITAL MARS\dmd2 though it might be better to not use spaces in the path to dmd. It doesn't always like this, see http://dlang.org/dmd-windows.html#problems Double back slashes are usually no problem, and you don't need dmc to compile D files.
Apr 14 2014
parent reply "Capture_A_Lag" <bla bla.bla> writes:
Hi! Thank you all for your help!

I've done something with path and now it finds dmd.
But now I get another error "Error 2: File Not Found 
user32.lib	D:\Developing\Visual Studio 
2013\Projects\D_TEST2\D_TEST2\user32.lib".

Looks like it is trying to find libraries in the project 
directory, though I have set the libraries path to 
"D:\Developing\DIGITAL MARS\dm\lib; D:\Developing\DIGITAL 
MARS\dmd2\windows\lib"

Please!
I need your help again!
Apr 14 2014
parent reply "Capture_A_Lag" <bla bla.bla> writes:
I don't know what I have done, but everything works good now.
Thanks everybody for help!
Apr 15 2014
parent reply "Teak" <lateakwa hotmail.com> writes:
On Tuesday, 15 April 2014 at 13:59:31 UTC, Capture_A_Lag wrote:
 I don't know what I have done, but everything works good now.
 Thanks everybody for help!
Hi, Im having the same problem you had trying to run a d language project...I keep getting the following error Build started: Project: ScreencastHelloWorld, Configuration: Debug x64 ------ Building Debug\ScreencastHelloWorld.exe... 'dmd' is not recognized as an internal or external command, operable program or batch file. Building Debug\ScreencastHelloWorld.exe failed! Details saved as "file://c:\users\lateakwa\documents\visual studio 2010\Projects\ScreencastHelloWorld\ScreencastHelloWorld\Debug\ScreencastHelloWorld.buildlog.html" ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== any suggestions???? Im using 2010 visual studio professional and the visual d plugin.
Nov 01 2014
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 02.11.2014 00:09, Teak wrote:
 On Tuesday, 15 April 2014 at 13:59:31 UTC, Capture_A_Lag wrote:
 I don't know what I have done, but everything works good now.
 Thanks everybody for help!
Hi, Im having the same problem you had trying to run a d language project...I keep getting the following error Build started: Project: ScreencastHelloWorld, Configuration: Debug x64 ------ Building Debug\ScreencastHelloWorld.exe... 'dmd' is not recognized as an internal or external command, operable program or batch file. Building Debug\ScreencastHelloWorld.exe failed! Details saved as "file://c:\users\lateakwa\documents\visual studio 2010\Projects\ScreencastHelloWorld\ScreencastHelloWorld\Debug\ScreencastHelloWorld.buildlog.html" ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== any suggestions???? Im using 2010 visual studio professional and the visual d plugin.
Have you verified the dmd installation path? Go to Tool->Options->Projects and Solutions->Visual D Settings->DMD Directories and check the "DMD Installation path". This must be the absolute path of the folder that contains the "windows" subfolder (not the windows/bin folder itself!). If this is correct, please post the build log in the Debug folder. It would be best to report to https://issues.dlang.org/enter_bug.cgi to keep track of the issue.
Nov 02 2014