View previous topic :: View next topic |
Author |
Message |
flamaros
Joined: 02 Feb 2008 Posts: 33
|
Posted: Tue Aug 31, 2010 2:58 am Post subject: Build failed in debug mode |
|
|
Here is the output when I am trying to build a new window D project in debug mode (works fine in release) :
Code: |
------ Build started: Project: WindowsApp1, Configuration: Debug Win32 ------
Building Debug\WindowsApp1.exe...
OPTLINK (R) for Win32 Release 8.00.2
Copyright (C) Digital Mars 1989-2009 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Error 118: Filename Expected
Path=D:\Softs\D\dmd2\windows\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;D:\Softs\VTune\CGGlbCache;D:\Softs\VTune\Analyzer\Bin;D:\Softs\VTune\Shared\Bin;D:\Softs\Python26\Lib\site-packages\PyQt4\bin;D:\Softs\Perl\site\bin;D:\Softs\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Fichiers communs\Roxio Shared\DLLShared\;C:\Program Files\Fichiers communs\Roxio Shared\9.0\DLLShared\;D:\Softs\SDKs\Wii\NDEV\bin;D:\Softs\Microsoft Visual Studio 8\VC\bin;D:\Softs\doxygen\bin;D:\Softs\Graphviz2.24\bin;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;D:\Softs\TortoiseGit\bin;D:\Softs\QuickTime\QTSystem\;D:\Softs\TortoiseSVN\bin;D:\Softs\gDEBugger\gDEBugger\;D:\Softs\D\dmd\windows\bin;D:\Softs\D\dmd2\windows\bin;D:\Softs\D\dm\bin;D:\Projects\Tetraedge\Trunk\TeEngine_3\Tools\Libs\Qt;D:\Softs\FileVerifier++\;D:\Softs\SDKs\Android\android-sdk-windows\tools;D:\Softs\apache-ant\bin
^
--- errorlevel 1
Building Debug\WindowsApp1.exe failed!
Details saved as "file://D:\Projects\Tetraedge\Trunk\DTest\DTest\WindowsApp1\Debug\buildlog.html"
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
I have some spaces character in my Path environment variable. I made some research and it seems special characters are incompatible with the -g option used with dmd in debug mode.
Here is the command line generated in debug :
Code: |
dmd -g -debug -X -Xf"$(IntDir)\$(ProjectName).json" -of"$(OutDir)\$(ProjectName).exe_cv" -deps="$(OutDir)\$(ProjectName).dep" -map "$(INTDIR)\$(SAFEPROJECTNAME).map" -L/NOMAP |
|
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Tue Aug 31, 2010 1:21 pm Post subject: |
|
|
Hmmm, no idea how you can get this output. Could you also post the contents of buildlog.html?
Maybe optlink gets a problem with such a long PATH environment variable. But it should not be different between release and debug builds. |
|
Back to top |
|
|
flamaros
Joined: 02 Feb 2008 Posts: 33
|
Posted: Wed Sep 01, 2010 2:13 am Post subject: |
|
|
Yes my Path environment variable is long (1013 characters).
You can take a look to this link : http://www.digitalmars.com/archives/cplusplus/4835.html
Code: |
<html><head><META HTTP-EQUIV="Content-Type" content="text/html">
</head><body><pre>
<table width=100% bgcolor=#CFCFE5><tr><td>
<font face=arial size=+3>Build Log</font>
</table>
<table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
Building Debug\WindowsApp1.exe
</font></table>
<table width=100% bgcolor=#EFEFE5><tr><td><font face=arial size=+1>
Command Line
</font></table>
set PATH=D:\Softs\D\dmd2\windows\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\\bin;%PATH%
dmd -g -debug -X -Xf"Debug\WindowsApp1.json" -of"Debug\WindowsApp1.exe_cv" -deps="Debug\WindowsApp1.dep" -map "Debug\WindowsApp1.map" -L/NOMAP winmain.d
if errorlevel 1 goto reportError
if not exist "Debug\WindowsApp1.exe_cv" (echo "Debug\WindowsApp1.exe_cv" not created! && goto reportError)
echo Converting debug information...
"D:\Softs\VisualD\cv2pdb\cv2pdb.exe" -D2 "Debug\WindowsApp1.exe_cv" "Debug\WindowsApp1.exe"
if errorlevel 1 goto reportError
if not exist "Debug\WindowsApp1.exe" (echo "Debug\WindowsApp1.exe" not created! && goto reportError)
goto noError
:reportError
echo Building Debug\WindowsApp1.exe failed!
:noError
<table width=100% bgcolor=#EFEFE5><tr><td><font face=arial size=+1>
Output
</font></table>
OPTLINK (R) for Win32 Release 8.00.2
Copyright (C) Digital Mars 1989-2009 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Error 118: Filename Expected
Path=D:\Softs\D\dmd2\windows\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;D:\Softs\VTune\CGGlbCache;D:\Softs\VTune\Analyzer\Bin;D:\Softs\VTune\Shared\Bin;D:\Softs\Python26\Lib\site-packages\PyQt4\bin;D:\Softs\Perl\site\bin;D:\Softs\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Fichiers communs\Roxio Shared\DLLShared\;C:\Program Files\Fichiers communs\Roxio Shared\9.0\DLLShared\;D:\Softs\SDKs\Wii\NDEV\bin;D:\Softs\Microsoft Visual Studio 8\VC\bin;D:\Softs\doxygen\bin;D:\Softs\Graphviz2.24\bin;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;D:\Softs\TortoiseGit\bin;D:\Softs\QuickTime\QTSystem\;D:\Softs\TortoiseSVN\bin;D:\Softs\gDEBugger\gDEBugger\;D:\Softs\D\dmd\windows\bin;D:\Softs\D\dmd2\windows\bin;D:\Softs\D\dm\bin;D:\Projects\Tetraedge\Trunk\TeEngine_3\Tools\Libs\Qt;D:\Softs\FileVerifier++\;D:\Softs\SDKs\Android\android-sdk-windows\tools;D:\Softs\apache-ant\bin;
^
--- errorlevel 1
Building Debug\WindowsApp1.exe failed!</body></html>
|
|
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Wed Sep 01, 2010 11:39 am Post subject: |
|
|
Good link. It's the '+' in "D:\Softs\FileVerifier++" that is confusing optlink.
I can't do a lot about it in Visual D, only strange workarounds like filtering the path variable that might be confusing when other tools in pre/post-build-commands need it. You can do this yourself by changing PATH in the pre-build command. "set PATH=" should be enough.
You might want to file a bug-report for optlink here: http://d.puremagic.com/issues/ |
|
Back to top |
|
|
|