Subject Re: [firebird-support] Re: building a DLL and trying to use gcc
Author Ray Holme
On Sun, 2012-04-29 at 17:32 +0000, hvlad wrote:
> How does you declare isc_decode_date and ib_util_malloc in your code ?
> Does you used C++ or C compiler ?
>
> Regards,
> Vlad

I said it was C not C++ and I said that I use ibase.h and ib_util.h to
define the two routines, but I should also say that my gcc compile line
specifies "-DWIN32" so the functions would be declared

extern void __stdcall isc_decode_date(...)
and
extern void * isc_util_malloc(...)

the latter should probably have been declared:

extern void * ISC_EXPORT isc_util_malloc(...)
in ib_util.h but is not
(I do put in the __stdcall for ALL my udf functions)

Despite that I do not match and find the routines in the two libraries.
The only other thing I can see doing would be defining __cplusplus and
following the pattern in ib_util.h by wrapping all my functions with
extern "C" {
mycode
} /* end extern "C" */

But I don't think that is right as this is not a c++ program and I
expect that the compiler would not like it if I pretended to be c++.