FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Build failed in debug mode

 
Post new topic   Reply to topic     Forum Index -> Visual D
View previous topic :: View next topic  
Author Message
flamaros



Joined: 02 Feb 2008
Posts: 33

PostPosted: Tue Aug 31, 2010 2:58 am    Post subject: Build failed in debug mode Reply with quote

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
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Tue Aug 31, 2010 1:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
flamaros



Joined: 02 Feb 2008
Posts: 33

PostPosted: Wed Sep 01, 2010 2:13 am    Post subject: Reply with quote

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&quot;Debug\WindowsApp1.json&quot; -of&quot;Debug\WindowsApp1.exe_cv&quot; -deps=&quot;Debug\WindowsApp1.dep&quot; -map &quot;Debug\WindowsApp1.map&quot; -L/NOMAP winmain.d
if errorlevel 1 goto reportError
if not exist &quot;Debug\WindowsApp1.exe_cv&quot; (echo &quot;Debug\WindowsApp1.exe_cv&quot; not created! &amp;&amp; goto reportError)
echo Converting debug information...
&quot;D:\Softs\VisualD\cv2pdb\cv2pdb.exe&quot; -D2 &quot;Debug\WindowsApp1.exe_cv&quot; &quot;Debug\WindowsApp1.exe&quot;
if errorlevel 1 goto reportError
if not exist &quot;Debug\WindowsApp1.exe&quot; (echo &quot;Debug\WindowsApp1.exe&quot; not created! &amp;&amp; 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
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Wed Sep 01, 2010 11:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Visual D All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group