Windows Vista Beta | WinVistaBeta.com - Message | Statically linking .LIB files in an MFC App

December 03, 2008  
Subject: Statically linking .LIB files in an MFC App
Group: microsoft.public.vstudio.general
Date: 9/2/2008 2:36:17 PM
From: davidmurray1@gmail.com

I have a few LIB files that I want to link with my MFC app. I went to
project properties and followed the path:

Configuration Properties->Linker->Input and listed all of my .LIB
files. Originally the project used DLLs, so i converted the DLLs to
LIBs. So, after compiling with the LIB files statically linked, I
took the executable (which wasn't any bigger in size... making me
think that i did it incorrectly) and threw it on a flash drive.
However, when I try to run it, it's still looking for the DLL files
that I converted to LIB and tried to static link.


So, can someone walk me through the process to link LIB files
statically?



Thanks!

Back
Subject: Re: Statically linking .LIB files in an MFC App
Group: microsoft.public.vstudio.general
Date: 9/2/2008 4:04:21 PM
From: David Lowndes [Email Address Protection]

>Originally the project used DLLs, so i converted the DLLs to
>LIBs.

Presumably whatever you've done hasn't really changed anything. It
might be cleanest if you start with a new static library project and
add your existing source files to it.

>So, can someone walk me through the process to link LIB files
>statically?

If you really do have static libraries there's nothing different, you
just have to have your project link to them as you've attempted to do
- it's no different to DLL libs in that respect, just the outcome
should be different.

Dave

Back