Adding a reference to a static library in VS.NET

  • Thread starter Thread starter Lady_A
  • Start date Start date
L

Lady_A

Hi,

I need to add a reference to a static library (*.lib) to a COM/ATL
project in VS.NET.
Apparently if this library is not in my solution that is not possible
using the ordinary way : Add Reference.
The Add Reference Dialog only allows me to browse and add a
*.dll,*.ocx,*.tlb, *.olb and *.exe.
No *.lib!
While if it is in the same solution I automatically see the library
project in the project tab and can reference it.

I do not want to move my library project to the solution where my
COM/ATL project is.
How can I still achieve adding that reference ?


Thanx!!!
 
If your project is in managed code, you don't have an option of static
linking. In this case, you could write an unmanaged C++ (or VB or
whatever) DLL that statically links that .LIB file and then add a
reference to that DLL in your managed project.
 
Uri,

My project is a C++ COM/ATL project (using VS.NET ATL Wizard).
Meaning unmanaged.

So how can I link to a lib that is not in my solution using VS.NET ?

Thanx!
 
Back
Top