Shared Libraries in C/C++/PRO C under Unix by g++ :Segmentation fault

Hi All
I am trying to make a shared library from a pro c program program.pc and its function is called from another program abc.c. I am able to generate program.so file but in the program.pc file there is a sql CONNECT statement
EXEC SQL CONNECT :hUser IDENTIFIED BY :hPasswd AT :hDbname USING :hDbname
So at this statement I am getting segmentation fault at run time.
Moreover this works if I give the abc.o and program.so file during compilation (not using dlopen etc in abc.c).
But it gives segmentation fault when in abc.c I use dlopen dlsym and call the function of the shared library.
Please help me if possible.(This activity is done under linux)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories