link.exe returns error LNK1181: cannot open input file ‘C:Program.obj’

I’m compiling with a Batch file containing

@echo off

set link=C:Program Files (x86)Microsoft Visual Studio 11.0VCbinlink

"%link%" external_input.obj periodic_dinger.obj flagger.obj monitor.obj main.obj libGui.lib libCore.lib libCint.lib libRIO.lib libNet.lib libHist.lib libGraf.lib libGraf3D.lib libGpad.lib libTree.lib libRint.lib libPostscript.lib libMatrix.lib libPhysics.lib libMathCore.lib libThread.lib

All the objects and libraries are in the same directory, which is the directory I’m executing the Batch file from, and also where the Batch file is located. I’ve tried adding the current directory to /LIBPATH:, but no luck. My LIB environment variable is

C:UsersjrothDataonline_monitor_v.0.5>echo %LIB%
"C:Program Files (x86)Microsoft Visual Studio 11.0VCLIB";"C:Program Files
(x86)Microsoft Visual Studio 11.0VCATLMFCLIB";"C:Program Files (x86)Window
s Kits.0libwin8umx86";

I made sure that everything was quoted. The same error came up when everything was unquoted. The error verbatim is

C:UsersjrothDataonline_monitor_v.0.5>make
Microsoft (R) Incremental Linker Version 11.00.50727.1
Copyright (C) Microsoft Corporation.  All rights reserved.

C:Program Files (x86)Microsoft Visual Studio 11.0VCbinlink
LINK : fatal error LNK1181: cannot open input file 'C:Program.obj'

make.bat is the name of the batch file I’m using to link this, not a makefile.

I’m running vcvarsall.bat before doing any of this.


Source: windows

Leave a Reply