🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9561

Re: how to link dll into exe with C++Builder v5

#9561
From: Andrue Cope [TeamB]
Date: Fri, 02 Jul 2004 13:47
38 lines
2477 bytes
Jarkko Halme wrote:

> How can I do the same thing with normal dll?

I don't think you can. AFAIK a DLL is a dynamic link library and must
be linked dynamically. It's possible that someone has produced a tool
that can combine all the files into one image but that's not quite the
same thing. You as the distributor would still have to remember to
generate the file.

> In the Builder's "Project Options" there is a tab "Linker" from where
> one can select if one wants to include "RTL" inside of exe or not

What that option does is cause the linker to link static versions of
those libraries rather than the dynamic ones. These are separate files
generated (by Borland) separately.

Producing a static version of a library from a dynamic version should
require next to no programming changes in the library itself. The EXE
will need some code removing though if it's using
LoadLibrary/FreeLibrary but aside from being slightly tedious is not
difficult.

There might be a way to modify an existing DLL project to produce a LIB
but I can't find it. Instead you can create a new project
(\File\New\Other\Library) and add all your files to that. Alternatively
you might be able to run the command line linker to combine all your
existing OBJs into a LIB.

For more information I suggest you ask in the .IDE newsgroup section
since this question has no relevance to the windows API and so doesn't
belong here.

Follow-up set to .IDE
-- 
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <40e5677e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40e55e77$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1887b3565be7ffc9
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Andrue Cope [TeamB]" <no.spam@spammy.com>
Subject: Re: how to link dll into exe with C++Builder v5
Newsgroups: borland.public.cppbuilder.nativeapi
Followup-To: borland.public.cppbuilder.ide
References: <40e55e77$1@newsgroups.borland.com>
User-Agent: XanaNews/1.16.3.1
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 217.207.223.34
Message-ID: <40e5677e$1@newsgroups.borland.com>
Date: 2 Jul 2004 06:47:42 -0700
X-Trace: newsgroups.borland.com 1088776062 217.207.223.34 (2 Jul 2004 06:47:42 -0700)
Lines: 38
X-Authenticated-User: acope
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail