digitalmars.D.learn - How to compile for Win64 with Visual D? Optlink error?
- Timothy Foster (19/19) Sep 19 2017 I'm trying to compile my project as a Win64 application but this
- Nicholas Wilson (7/26) Sep 19 2017 I'm not sure why its trying to use opt link for 64-bit, the
- Daniel Kozak (6/23) Sep 19 2017 this should be ok, can you post error when using with m64
- Rainer Schuetze (10/32) Sep 19 2017 That usually happens if the DMD bin folder is searched first in the PATH...
I'm trying to compile my project as a Win64 application but this is happening: Building C:\Users\me\test\test.exe... OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Warning 183: Extension not .RES : obj\debug\dummy\test\..\source\c.obj obj\debug\dummy\test\..\source\b.obj(1) : Error 52: .DEF Syntax Error d†šöñÀY$ ^ Building C:\Users\me\test\test.exe failed! I'm on a Win64 machine and compiling Win32 works fine. I'm using Visual Studio 17 Community with Visual D. DMD is up to date as is Visual D. I added a x64 "solution platform" to the configuration manager which added a -m64 flag to my linker options. I'm not sure what else I'm meant to do to get it to compile as x64?
Sep 19 2017
On Tuesday, 19 September 2017 at 11:47:00 UTC, Timothy Foster wrote:I'm trying to compile my project as a Win64 application but this is happening: Building C:\Users\me\test\test.exe... OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Warning 183: Extension not .RES : obj\debug\dummy\test\..\source\c.obj obj\debug\dummy\test\..\source\b.obj(1) : Error 52: .DEF Syntax Error d†šöñÀY$ ^ Building C:\Users\me\test\test.exe failed! I'm on a Win64 machine and compiling Win32 works fine. I'm using Visual Studio 17 Community with Visual D. DMD is up to date as is Visual D. I added a x64 "solution platform" to the configuration manager which added a -m64 flag to my linker options. I'm not sure what else I'm meant to do to get it to compile as x64?I'm not sure why its trying to use opt link for 64-bit, the linker banner gives a hint: OPTLINK (R) for _Win32_. 64 bit should use MS's linker, is -m64 only passed to the linker but not the compiler?
Sep 19 2017
this should be ok, can you post error when using with m64 On Tue, Sep 19, 2017 at 1:47 PM, Timothy Foster via Digitalmars-d-learn < digitalmars-d-learn puremagic.com> wrote:I'm trying to compile my project as a Win64 application but this is happening: Building C:\Users\me\test\test.exe... OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Warning 183: Extension not .RES : obj\debug\dummy\test\..\sourc=e\c.obj obj\debug\dummy\test\..\source\b.obj(1) : Error 52: .DEF Syntax Error d=C3=A2=E2=82=AC =C3=85=C2=A1 =C3=83=C2=B6=C3=83=C2=B1=C3=83=E2=82=ACY$ ^ Building C:\Users\me\test\test.exe failed! I'm on a Win64 machine and compiling Win32 works fine. I'm using Visual Studio 17 Community with Visual D. DMD is up to date as is Visual D. I added a x64 "solution platform" to the configuration manager which adde=da -m64 flag to my linker options. I'm not sure what else I'm meant to do =toget it to compile as x64?
Sep 19 2017
On 19.09.2017 13:47, Timothy Foster wrote:I'm trying to compile my project as a Win64 application but this is happening: Building C:\Users\me\test\test.exe... OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Warning 183: Extension not .RES : obj\debug\dummy\test\..\source\c.obj obj\debug\dummy\test\..\source\b.obj(1) : Error 52: .DEF Syntax Error d†šöñÀY$ ^ Building C:\Users\me\test\test.exe failed! I'm on a Win64 machine and compiling Win32 works fine. I'm using Visual Studio 17 Community with Visual D. DMD is up to date as is Visual D. I added a x64 "solution platform" to the configuration manager which added a -m64 flag to my linker options. I'm not sure what else I'm meant to do to get it to compile as x64?That usually happens if the DMD bin folder is searched first in the PATH variable (unfortunately the linker and other tools have the same name as the Microsoft programs). You should verify that the VC folder is listed first in Tools->Options->Projects and Solutions->Visual D Settings->DMD Directories->x64->Executable Paths, i.e. $(VCTOOLSINSTALLDIR)bin\HostX86\x86 should be listed before $(DMDInstallDir)windows\bin
Sep 19 2017