Board index » delphi » Problems with Header files and Libraries

Problems with Header files and Libraries

Hi there,

I am just getting starting with Borlan C++ Builder (version 3) and I am
trying to write a dll which makes use of a database (using TSession,
TDatabase, etc) and is also thread safe requiring me to use
TCriticalSection.

When I first put these into the program, thinking all definitions are
included by default, I was surprised when it came up with undefined
symbol errors. Trying to resolve this problem I found that nowhere
within the manuals I have received could I find any information on what
header files and libraries should be included for various types of
functionality.

First Question - In general, is there somewhere I can look which states
that if you want to use a particular class or function you will need to
include these particular header files and libraries?

By digging and searching through all the header files that came with
C++Builder I managed to find the include files <vcldb.h> and
<syncobjs.hpp> which provided appropriate definitions. However, when it
came to linking the linker threw up 'Unresolved External' errors for all
the TCriticalSection, TSession, TDatabase, etc classes.

Second Question - If there isn't an answer to the first question does
anyone know what header files I should be included and also what
libraries I must include to allow the code to compile.

TIA,
Kevin Farnes
kfar...@bcs.org.uk

 

Re:Problems with Header files and Libraries


#1
The online docs always give you the header file or unit to include.
#2
Goto Project | Options | Packages.  Hit the help button for more details.
--
Randy Charles Morin - mailto:rmo...@kbcafe.com
The Programmer's Knowledge Base - http://tips.kbcafe.com/tips/
Quote
Kevin Farnes wrote:
> Hi there,

> I am just getting starting with Borlan C++ Builder (version 3) and I am
> trying to write a dll which makes use of a database (using TSession,
> TDatabase, etc) and is also thread safe requiring me to use
> TCriticalSection.

> When I first put these into the program, thinking all definitions are
> included by default, I was surprised when it came up with undefined
> symbol errors. Trying to resolve this problem I found that nowhere
> within the manuals I have received could I find any information on what
> header files and libraries should be included for various types of
> functionality.

> First Question - In general, is there somewhere I can look which states
> that if you want to use a particular class or function you will need to
> include these particular header files and libraries?

> By digging and searching through all the header files that came with
> C++Builder I managed to find the include files <vcldb.h> and
> <syncobjs.hpp> which provided appropriate definitions. However, when it
> came to linking the linker threw up 'Unresolved External' errors for all
> the TCriticalSection, TSession, TDatabase, etc classes.

> Second Question - If there isn't an answer to the first question does
> anyone know what header files I should be included and also what
> libraries I must include to allow the code to compile.

> TIA,
> Kevin Farnes
> kfar...@bcs.org.uk

Other Threads