VS 2010 build issue : reference issue

166 Views Asked by At

I have solution with multiple projects.

Few common folders for Bin/Lib/Include e.g. all exported lib in Lib folder, executable in Bin folder and header in Include

Example

Solution - S Project A1 - DLL Project A2 - Exe ... Project An

Project A2 is dependent on Proj A1

I have build complete solution and deleted everything except SDK(Bin\lib\Include) folder. because its Big solution so we utilize this exported SDK and build any application

Now i have taken complete code (A1, A2, ... An) and opened only project A2,

But when i build it gives me following error cannot open input file 'C:\Code\Development\Src\A2\Debug7\A1.lib'

Why its not picking up the library from common lib folder.

it was working fine in VS 2008, but after upgrade to 2010 its never worked.

2

There are 2 best solutions below

1
On

My guess would be that you might still have the code version of A1 in the references folder of your A2 project. It's something to check, in any case.

1
On

I can only guess that dependencies are saved in the solution file, so if you only open one project instead of the original solution then that information is lost.

'C:\Code\Development\Src\A2\Debug7\A2.lib'

Q: Why would project A2 be trying to open its own lib file? Surely the lib file is the output (static library, or import library for use by other modules).

You might find that setting the A2 project's Additional Library Directories (Linker section of the project's Properties) to point to the correct path would help - tell it where it can find the libraries it needs.