Subject Re: [firebird-support] udf and iostream problem
Author v.pavlov
On 03/05/2010 1:48 PM, Aurimas Černius wrote:
>
> Hi,
>
> > I have a very simple example of udf library - one function which
> > returns always null - and it works fine.
> > Just adding the include to iostream makes the library non loadable -
> > the error is :
> > "Invalid token.
> > invalid request BLR at offset 63.
> > function F_GETCOMPUTERNAME is not defined.
> > module name or entrypoint could not be found."
> >
> > Please tell me what may go wrong when including the iostream?
> >
> > //#include<iostream>
> >
> >
> > extern "C"{
> >
> > char* edb_getComputerName(){
> > return 0;
> > }
> >
> > }
>
> Try writing a simple application in C (not C++), that will load this
> library dynamically (via dlopen()/LoadLibrary()).
>
I tried ldd before and after the "include<iostream>"
the result is the same:
linux-gate.so.1 => (0xb7f12000)
libc.so.6 => /lib/libc.so.6 (0xb7dd9000)
libm.so.6 => /lib/libm.so.6 (0xb7db3000)
/lib/ld-linux.so.2 (0xb7f13000)

I simplified the code, now it is:

include <iostream>

char* edb_getComputerName(){
return 0;
}

and the generated library ca not be loaded in firebird.
If I build it as an application - it works normally !!!
I tried to run firebird service as root - jut to check, but the library
still can not be loaded.

Please, someone to help.


[Non-text portions of this message have been removed]