<p>I've figured out how to set VC++ to compile code into a .lib file instead of a .exe, but I'm having trouble getting a lib to link together with my other .obj files.</p>

<p>Here is how I have the library and application folders set up.  (I'm not sure if this is right)</p>

<pre><code>AppFolder
  App.sln
  App.ncb
  *.h
  *.cpp
  Debug
    *.obj
    App.exe
</code></pre>

<p>and somewhere else on the hard drive...</p>

<pre><code>LibraryFolder
  lib
    Library.lib
  include
    LibrarySolutionFolder
      Library.sln
      Library.ncb
      *.h
      *.cpp
      Debug
        *.obj
        Library.lib
</code></pre>

<p>I've been #including the library *.h files from my app's cpp files, and everything compiles fine.  It's just when it links I get a list of all the .lib
files that are being searched, and Library.lib isn't on there even though I have it listed in VC++ directories.
How can I get this to link?  (And am I structuring the library folders correctly?)</p>

On the project properties:
Configuration Properties -> Linker -> Input -> Additional Dependancies
Add it in there.
Or, in your .h file for the library, add:
```
```
#pragma comment(lib, "Library")
```
```
This will do it automatically for you.