Subject Re: [firebird-support] Compiling UDF in Linux (CENTOS 6)
Author Alex Castillo
Hello,
 
I've solved this issue by myself. These are the steps:

- Install EPEL 6
- Install codeblocks
- Create a dynamic library project
- Add the flags -fPIC and -share to the compiler options
- Add the Fb include directory
- Add the Fb *.so you need.
- Build and fun :) !
 
Regards,
_______________________________
I'm free, I use GNU/Linux.
Close your Windows, Open your mind.

--- El dom 20-ene-13, Alex Castillo <acr_korn@...> escribió:


De: Alex Castillo <acr_korn@...>
Asunto: [firebird-support] Compiling UDF in Linux (CENTOS 6)
A: "Firebird Support" <firebird-support@yahoogroups.com>
Fecha: domingo, 20 de enero de 2013, 22:13



 



Hello everyone,

I've created an UDF using Codeblocks against FB CS 2.1.5 and everything is ok on Windows 7. Now I'm trying to copile the same code on Linux Centos 6 without success.

Actually, the gcc compiler didn't send any error but when I call the function FB chashes and shuts down the service.

Here are the commmands I'm using to create the UDF:

#gcc -c -O -fpic -I /opt/firebird/include -L"/opt/firebird/lib/" PhoenixUDF.c

#ld -G PhoenixUDF.o -lm -lc -L"/opt/firebird/lib/libib_util.so" -L"/opt/firebird/lib/libfbclient.so.2.1.5" -o PhoenixUDF.so

I'm using ib_util_malloc to alloc memory for char arrays, that's why I need to link to the Fb libraries.

Do you have any ideas in order to solve my problem?

Thanks in advance.

Best regards,

_______________________________
I'm free, I use GNU/Linux.
Close your Windows, Open your mind.







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