Mohan
Mohan

Reputation: 1955

Bundle a static library(.lib file) into dll

I am building a dll project. I am using openssl and quickfix libraries. I don't want users to separately copy the libraries when they use dll. I want to bundle these .lib files into my dll as well.

I am using visual studio. How can I bundle these libraries(.lib static libraries) into my dll so that the user can just copy my dll into their projects and start working right away.

Thanks,

Upvotes: 1

Views: 599

Answers (1)

athos
athos

Reputation: 6405

by default it'll be bunded in. you program, just call it MyProgram.DLL, can

  1. call other programs, as a DLL file, e.g. C Runtime Library provides MSVCRT.DLL for MyProgram.DLL to call; or
  2. include other program's Static Library file, i.e. the .LIB files, inside your binary, i.e. MyProgram.DLL, e.g. C Runtime Library provides LIBCMT.LIB for MyProgram.DLL to include inside and call.

It seems you want option 2), but actually, since what provided are .LIB files, option 1) is not possible for you.

Upvotes: 1

Related Questions