Am Mittwoch, den 12.11.2008, 21:40 +0200 schrieb KES: > Здравствуйте, Marc. > > Вы писали 12 ноября 2008 г., 21:20:23: > > MS> Am Mittwoch, den 12.11.2008, 20:00 +0100 schrieb Marc Santhoff: > >> Am Mittwoch, den 12.11.2008, 20:02 +0200 schrieb KES: > >> > I have tryed in C: > >> > > >> > extern int fntest(); > >> > > >> > int fntest() > >> > { > >> > return 8; > >> > } > >> > > >> > this work, but fpc does not ((( > >> > >> Maybe looking at the .o with nm helps to show you how the function name > >> is mangled. > >> > >> Or use "fpc -s ..." and "gcc -S -fverbose-asm ..." on both source files > >> for comparing the labels in the generated assembler code. > > MS> Oops, I meant "fpc -a ...". > > MS> Marc > > C file: > testudf.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), > dyna > 00001630 A _DYNAMIC > 00001704 A _GLOBAL_OFFSET_TABLE_ > w _Jv_RegisterClasses > 000016f4 d __CTOR_END__ > 000016f0 d __CTOR_LIST__ > 000016fc d __DTOR_END__ > 000016f8 d __DTOR_LIST__ > 0000162c r __FRAME_END__ > 00001700 d __JCR_END__ > 00001700 d __JCR_LIST__ > 0000171c A __bss_start > w __cxa_finalize@@FBSD_1.0 > 00000550 t __do_global_ctors_aux > 000004a0 t __do_global_dtors_aux > 00001624 d __dso_handle > 00000537 t __i686.get_pc_thunk.bx > 0000171c A _edata > 00001720 A _end > 00000584 T _fini > 0000046c T _init > 0000171c b completed.4685 > 00000540 T fntest > 00000500 t frame_dummy > 00001628 d p.4683 > > > libtkes2.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), > dynamically linked, not stripped > U FINALIZE$_OBJPAS > U FPC_INITIALIZEUNITS > 0000158c D FPC_RESOURCESTRINGTABLES > 0000157c D FPC_THREADVARTABLES > U INIT$_OBJPAS > U INIT$_SYSTEM > 00001564 D INITFINAL > 00000530 T P$TKES2_SOMEFN$$LONGINT > 00000544 T P$TKES2_main > 00000544 T PASCALMAIN > U THREADVARLIST_OBJPAS > 00001560 D THREADVARLIST_P$TKES2 > U THREADVARLIST_SYSTEM > 000015cc A _DYNAMIC > 00001654 A _GLOBAL_OFFSET_TABLE_ > 00001660 A __bss_start > 00001598 D __fpc_valgrind > 00001594 D __heapsize > 00001590 D __stklen > 00001660 A _edata > 00001660 A _end > 00000550 T _somefn > 00000530 T somefn
Hm, the function name is there, both show it as text section entry (fntest and _somefn), looks okay to me. Another test could be to make a short testing program (maybe in C) that loads your library and calls the function. If that works, the calling statement from SQL is not correct or loading fails. HTH anyhow, Marc _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal