www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Problems with x64 build with VC2012

reply "Szymon Gatner" <noemail gmail.com> writes:
Hi,

I am trying to build default main() provided with VisualD console 
app template.

I am using Visual Studio 2012 Update 4 and I am not able to build 
in x64 mode with error:

------ Build started: Project: ConsoleApp6, Configuration: Debug 
x64 ------
Building Debug\ConsoleApp6.exe...
OPTLINK (R) for Win32  Release 8.00.13
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 9: Unknown Option : OUT
OPTLINK : Error 12: Number Overflow : 
Building Debug\ConsoleApp6.exe failed!
Details saved as "file://c:\users\bravo\documents\visual studio 
2012\Projects\ConsoleApp6\ConsoleApp6\Debug\ConsoleApp6.buildlog.html"
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped 
==========
Jan 24 2014
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 24.01.2014 14:00, Szymon Gatner wrote:
 Hi,

 I am trying to build default main() provided with VisualD console app
 template.

 I am using Visual Studio 2012 Update 4 and I am not able to build in x64
 mode with error:

 ------ Build started: Project: ConsoleApp6, Configuration: Debug x64 ------
 Building Debug\ConsoleApp6.exe...
 OPTLINK (R) for Win32  Release 8.00.13
 Copyright (C) Digital Mars 1989-2010  All rights reserved.
 http://www.digitalmars.com/ctg/optlink.html
 OPTLINK : Warning 9: Unknown Option : OUT
 OPTLINK : Error 12: Number Overflow : 
 Building Debug\ConsoleApp6.exe failed!
 Details saved as "file://c:\users\bravo\documents\visual studio
 2012\Projects\ConsoleApp6\ConsoleApp6\Debug\ConsoleApp6.buildlog.html"
 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This sounds similar to what Arjan reported just today: somehow optlink is preferred over the MS linker (unfortunately they are both called link.exe). Please check linker path on the "Projects and Solutions->Visual D settings->DMD directories->x64" options page. It should have an absolute path to avoid optlink being found first via the PATH environment variable. If this doesn't reveal anything, please post the buildlog or the *.build.cmd file in the output directory.
Feb 10 2014