C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28629
Number of posts: 94611

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Shared Libraries in C/C++/PRO C under Unix by g++ :Segmentation fault Posted by sandeept_24 on 26 Jul 2006 at 11:48 PM
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)



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.