www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - [VisualD] Why does VS expect all the .obj files to have a '+' after

reply David Zhang <straivers98 gmail.com> writes:
I'm trying to compile a project of mine for the first time with 
Visual Studio, but I keep getting the following linker error:

     LINK : fatal error LNK1181: cannot open input file 
'obj\debug\dummy\test\..\source\test\app.obj+'

Nothing I do seems to work. What's going on here?
Oct 09
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 09.10.2017 18:13, David Zhang wrote:
 I'm trying to compile a project of mine for the first time with Visual 
 Studio, but I keep getting the following linker error:
 
      LINK : fatal error LNK1181: cannot open input file 
 'obj\debug\dummy\test\..\source\test\app.obj+'
 
 Nothing I do seems to work. What's going on here?
This looks like the wrong linker is called. For Win32, the default is to use link.exe that comes with dmd, i.e. $(DMDInstallDir)\windows\bin\link.exe. This linker only support the OMF object file format and has a different command line syntax than the Microsoft linker. To fix this, you should check that the path $(DMDInstallDir)\windows\bin comes first in the executable paths specified on the page Tools->Options->Projects and Solutions->Visual D Settings->DMD directories->Win32. If you build for x64 or enable MS-COFF output on the project property page Compiler->Output, the MS linker is used anyway, so should not have this problem.
Oct 09
parent reply David Zhang <straivers98 gmail.com> writes:
On Monday, 9 October 2017 at 17:34:38 UTC, Rainer Schuetze wrote:
 This looks like the wrong linker is called. For Win32, the 
 default is to use link.exe that comes with dmd, i.e. 
 $(DMDInstallDir)\windows\bin\link.exe. This linker only support 
 the OMF object file format and has a different command line 
 syntax than the Microsoft linker.

 To fix this, you should check that the path 
 $(DMDInstallDir)\windows\bin comes first in the executable 
 paths specified on the page Tools->Options->Projects and 
 Solutions->Visual D Settings->DMD directories->Win32.

 If you build for x64 or enable MS-COFF output on the project 
 property page Compiler->Output, the MS linker is used anyway, 
 so should not have this problem.
Right, thanks. Though I don't understand why dub doesn't generate a correct visual studio solution?
Oct 09
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 10.10.2017 00:50, David Zhang wrote:
 On Monday, 9 October 2017 at 17:34:38 UTC, Rainer Schuetze wrote:
 This looks like the wrong linker is called. For Win32, the default is 
 to use link.exe that comes with dmd, i.e. 
 $(DMDInstallDir)\windows\bin\link.exe. This linker only support the 
 OMF object file format and has a different command line syntax than 
 the Microsoft linker.

 To fix this, you should check that the path 
 $(DMDInstallDir)\windows\bin comes first in the executable paths 
 specified on the page Tools->Options->Projects and Solutions->Visual D 
 Settings->DMD directories->Win32.

 If you build for x64 or enable MS-COFF output on the project property 
 page Compiler->Output, the MS linker is used anyway, so should not 
 have this problem.
Right, thanks. Though I don't understand why dub doesn't generate a correct visual studio solution?
The path options are not part of the project, but global settings.
Oct 10