Главная страница | назад

Article #25415: Linking Errors when using InterBase API with C++Builder 3

When I try to use the InterBase API in a C++Builder 3 
project I get Linker errors like the following: [LinkerError] 
Unresolved external '_isc_start_transaction' referenced from ...

A few of the InterBase API functions are defined in 
ibase.h using the  __cdecl calling convention.  The 
C++Builder incremental linker prepends an underscore 
to these functions.   The gds32.dll does not export these 
functions with an underscore, thus the Unresolved external 
error message.

One solution is to add a module definition file to your project that 
creates an alias for the function.

Here is an example .def file that resolves the error for the 
isc_start_transaction function

--------------------- begin .def file -----------------------------

	_isc_start_transaction = GDS32.isc_start_transaction

--------------------- end .def file -----------------------------

Last Modified: 27-OCT-00