🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.upgrade
Article #2418

Re: Making OWL DLL's in BC Builder 4.0

#2418
From: Hans-Jochen Trost
Date: Tue, 18 Jan 2000 00:00
92 lines
3318 bytes
On Tue, 18 Jan 2000 12:43:15 +1300, Robert Wheadon
<robert.wheadon@nzonline.co.nz> wrote:

>Whoops,
>
>I this was supposed to be a reply to Hans-Jochen Trosts message on
>1/7/2000. ;-)

Robert,

I've meanwhile sat down and written up some how-to, primarily as a
reference for myself.  It is included below.  Note that even for a DLL
you're telling the OWL wizard to make an EXE project - hand-editing as
described below will take care of that diversion.

Cheers,                   Jochen


To transfer a project using OWL from BC++5.02 to BCB4:

0) Forget IDETOBPR.
1) Create a new project in BCB4 with the OWL wizard.
2) Make sure that no source file (.cpp) in the old project
   has the same name as the new project.
3) Add a line "#define WinMain" for an executable to the
   new main project source file, or "#define DllEntryPoint"
   for a DLL project, as shown below.
4) For DLLs, edit 4 lines in the .bpr file as shown below.
5) Add all files of the old project to the new one using the
   appropriate tool/button of BCB4.
6) Get a drink to relax.  You should be up and running.


Sample main file bc502.cpp for BCB4 project bc502.bpr
to accommodate a previous bc502 project of BC++5.02:

//--begin-file-bc502.cpp
#pragma hdrstop
#include <condefs.h>
USEUNIT("bc502main.cpp");   // Appears when adding file to project.
USEUNIT("bc502subs.cpp");   // Appears when adding file to project.
USERC("bc502res.rc");       // Appears when adding file to project.
//-----------------------------------------------------------------
#define WinMain
//--end-file-bc502.cpp



Sample main file bc502dll.cpp for BCB4 project bc502dll.bpr
to accommodate a previous bc502dll project of BC++5.02:

//--begin-file-bc502dll.cpp
#pragma hdrstop
#include <condefs.h>
USEUNIT("bc502dllold.cpp"); // Appears when adding file to project.
USEDEF("bc502dllold.def");  // Appears when adding file to project.
//-----------------------------------------------------------------
#define DllEntryPoint
//--end-file-bc502dll.cpp



Changes in a bc502dll.bpr file to convert from an .EXE to a .DLL:

Section:      # IDE SECTION
Entry:        PROJECT
.EXE has:     PROJECT=bc502dll.exe
.DLL needs:   PROJECT=bc502dll.dll

Section:      # IDE SECTION
Entry:        CFLAG1
Add flags:    -WD -tWD
Remove flags: -tW

Section:      # IDE SECTION
Entry:        LFLAGS
Add flags:    -Tpd
Remove flags: -Tpe

Section:      # IDE SECTION
Entry:        ALLOBJ
.EXE has:     ALLOBJ=c0w32.obj $(OBJFILES)
.DLL needs:   ALLOBJ=c0d32.obj $(OBJFILES)

End of changes

hjtrost at microfab dot com


Nil nimium studeo, Caesar, tibi velle placere,
nec scire ut an sis albus an ater homo.
                                          Catullus
Technical Details
Message-ID: <3884e51f.507560466@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3883A877.F663BB7A@nzonline.co.nz> <3883A913.8383CB38@nzonline.co.nz>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10529a,c98beda7a0e206b7
X-Google-Attributes: gid10529a,public
From: dont-email@but.post-re.ply (Hans-Jochen Trost)
Subject: Re: Making OWL DLL's in BC Builder 4.0
Date: 2000/01/18
Message-ID: <3884e51f.507560466@forums.inprise.com>
X-Deja-AN: 574421374
References: <3883A877.F663BB7A@nzonline.co.nz> <3883A913.8383CB38@nzonline.co.nz>
Organization: MicroFab Technologies, Inc.
Reply-To: dont-email@but.post-re.ply
Newsgroups: borland.public.cppbuilder.upgrade