Discussion:
Create static library from dll
(too old to reply)
Sadr LM
2008-08-05 11:30:30 UTC
Permalink
Is it possible to create one static library from more than one dlls? how do i do that with borland c++ builder 6.

Thank you,
Sadr LM
Bruce Salzman
2008-08-05 16:44:39 UTC
Permalink
Post by Sadr LM
Is it possible to create one static library from more than one dlls? how do
i do that with borland c++ builder 6.
Not directly, no. You need to create a new static library project and add the
proper source/object files to it.
--
Bruce
Remy Lebeau (TeamB)
2008-08-05 17:09:53 UTC
Permalink
Post by Sadr LM
Is it possible to create one static library from more than one dlls?
No. DLLs are specifically designed to be used as external files. Their
code can't be merged into the .exe directly. What you can do, however, it
add the .dll files are raw data resources to the .exe, and then the .exe can
extract them to disk at runtime when needed. For that to work, however, the
.exe cannot static link to those .dll files at compile them. It has to
dynamically load them at runtime via LoadLobrary() instead.


Gambit
Dennis Jones
2008-08-05 20:05:04 UTC
Permalink
Post by Sadr LM
Is it possible to create one static library from more than one dlls?
What you can do, however, it add the .dll files are raw data resources to
the .exe, and then the .exe can extract them to disk at runtime when
needed. For that to work, however, the .exe cannot static link to those
.dll files at compile them. It has to dynamically load them at runtime
via LoadLobrary() instead.
The technique Remy suggests is discussed in some detail here this article:
http://www.ddj.com/windows/184416443

- Dennis

Loading...