Reputation: 37
I am trying to compile this library: http://www.mega-nerd.com/SRC/win32.html . but I am having some trouble. Here's what happens:
C:\libsamplerate-0.1.8>make
1 file(s) copied.
1 file(s) copied.
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
link.exe /nologo /dll /incremental:no /libpath:""C:\Program Files (x86)\
Microsoft Visual Studio 10.0\Common7\IDE"\Lib" /pdb:"libsamplerate-0.pdb" /impli
b:".\libsamplerate-0.lib" /machine:I386 /out:"libsamplerate-0.dll" /def:".\Win32
\libsamplerate-0.def" ".\src\samplerate.obj" ".\src\src_linear.obj" ".\src\src
_zoh.obj" ".\src\src_sinc.obj"
LINK : fatal error LNK1181: cannot open input file 'Files.obj'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\link.exe"' : return code '0x49d'
Stop.
I run vcvars32.bat prior to attempting to compile, I think I have all the right folders in my path variable, but I'm new to this so I'm not entirely sure. What am I doing wrong?
Upvotes: 0
Views: 12840
Reputation: 81
You are having a quoting issue with the line:
/libpath:""C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"\Lib"
Should be:
/libpath:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Lib"
Upvotes: 4
Reputation: 352
You get error: "LINK : fatal error LNK1181: cannot open input file 'Files.obj'" Because the linker thinks you are adding file "Files" as one of input libraries. This comes from "C:\Program Files (x86)" (see the "Files"?) ;-)
Upvotes: 2
Reputation: 1323115
Check if kb 815645 doesn't help:
You receive a "
fatal error LNK1181
" error message when you build a Managed C++ application
fatal error LNK1181: cannot open input file 'C:\Program.obj'
Scenario 2:
The linker error
LNK1181
may also occur if you add an unqualified file to the Additional Dependencies project property, and that file does not exist in any of the search directories that are defined in theLIB
environment variable or the/LIBPATH
project property.
You may add the directory that contains library file to theLIBPATH
to resolve the problem:
- In Solution Explorer, right-click the project, and then click Properties.
- In the Property Pages dialog box, expand Linker, and then click General. In the Additional Library Directories field, specify the required library path.
Upvotes: 1