Incorporating a DLL in a project

This may seem like a dumb question but this is the first time I've tried and not having any luck.
Using Borland 5.02 and OWL 5.
I want to create and use a DLL in a project. All the books I have say something about using a linking program (buildlib or something like that) but it wasn't installed .
Do you have to create the DLL as a seperate project (I have 7 cpp files in the project I'm currently working on) and then bind it in somehow or can you build the cpp file into a DLL file in the same project???
Would someone mind walking me through the steps on creating and including a DLL in a project??
Txs
dooley090698Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlexVirochovskyCommented:
Hi, for creating DLL(as a seperate project) you must make
next steps:
1. From File|New|Project
  chouse in Trget Type:
Dinamic Library(dll)
2. Make you name (in Path and Name Box)
3. Add in Project all you cpp
4. Make some functions
 "export" as :

BOOL far _export CreateDLLWindow(HWND parentHWnd)
{
  TWindow *parentAlias = GetWindowPtr(parentHWnd);

  if (!parentAlias)
    parentAlias = new TWindow(parentHWnd);

  TWindow *window = new TWindow(parentAlias);

  window->Attr.Style |= WS_POPUPWINDOW | WS_CAPTION | WS_THICKFRAME
                        | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
  window->Attr.X = 100; window->Attr.Y = 100;
  window->Attr.W = 300; window->Attr.H = 300;
  return window->Create();
}
5. Build Project.

During building BC makes file
LIB(say test.lib, if you create
test.dll).
This file you must include in you
project , where you call some DLL
fonction, and in you .h file
use word extern :
BOOL far extern CreateDLLWindow(HWND parentHWnd);
(see every Windows .h file)

Alex
BTW: for creating lib file
BC use utility implib.exe (not buildlib!).
If you want, i can send you
ready project(write you EMail)

 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dooley090698Author Commented:
Alex,
The sample would be greatly appreciated.
You can e-mail to : cber@telusplanet.net
Txs
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.