Static Linking a dll
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Static Linking a dll

  1. #1
    Join Date
    Apr 2009

    Static Linking a dll

    Hi ..
    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.

  2. #2
    Join Date
    May 2007

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)