I'm using RedHat 7.1 the gcc compiler and the ld linker and now the makefile
is:
# let's call it LA (note: this uses STANDARD C++ LIBRARIES)
INGlobals: INGlobals.o NumUdf.o Stringudf.o
ld -o INGlobals INGlobals.o NumUdf.o Stringudf.o -shared -lgds
INGlobals.o: INGlobals.cpp
g++ -c -fPIC INGlobals.cpp
NumUdf.o: NumUdf.cpp
g++ -c -fPIC NumUdf.cpp
Stringudf.o: StringUdf.cpp
g++ -c -fPIC StringUdf.cpp
I made other two versions of the library:
LB: with C++, but using some simple classes without Standard Libraries.
LC: with pure C (that made with gcc)
I made trhee little programs that access the libraries:
PA: C++ program statically linked to LA
PB: C++ program that uses dl library routines (dlopen(),dlsym(),etc.)
PC: pure C program that uses dl library routines (dlopen(),dlsym(),etc.)
I know that the library exports clear function name by using the nm utility,
bu I have these results:
All it's ok when
PA access to LA
PB access dynamically to LA, LB (i did not try with LC)
PC access dynamically to LC
I get no handle from dlopen() when:
PC access to LA
I get the handle, but I get a "Segmentation Fault" when:
PC tried to use a function exported from LB
I'm sure that when I'l be able to access from PC to LA I'll be able to get
the library wortking as an UDF library on Interbase.
Is there anybody who can help me?
Thank you in advance,
Massimiliano Trezzi