June 5th, 2009, 09:49 PM
Static Linking a dll
I need some help in solving an issue related to static linking a dll.
Here is the problem..
I am developing an MFC application which needs to use a third party DLL "A.dll"
Now this dll is dependent on dll "B.dll" and which in turn is dependent on MFC71.dll
I've to link the dll "A" statically to the application i.e. single exe and no other dlls..
All I have is the three dlls, .lib file and a header file for dll "A". I dont have .tlb ( i.e. I can't use #import)
I am using VS 2008.
I tried using /MT switch in the code generation.
But still it doesn't help.
Appreciate any pointers into this issue.
June 5th, 2009, 11:38 PM
Re: Static Linking a dll
By it's nature (DLL) you can not statically link to it. *.lib file for DLL only has stubs which loader uses at run time to fix it and point to actual code resided in DLL.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.