Statically linking to a library that's also "included" in a shared library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(I am not subscribed to this list so please CC: me on all responses. Thanks.)

I've run into a problem with a couple of libraries that my (Linux) app relies on. My application links to a shared-library version of Ghostscript. But another part of my application needs to link to jpeglib (Independent JPEG Group) which I am building as a static library.

The problem is that Ghostscript builds its own copy of jpeglib which is statically linked into the Ghostscript shared library file. Now my application is calling Ghostscript's copy of jpeglib at run-time and NOT the version that I separately built as a static library resulting in (as best as I can understand) a memory corruption leading to a segfault.

How can I solve this problem?
Is there any way to modify the Ghostscript build process so that its "embedded" copy of jpeglib is not exported?

The platform is CentOS 5.3 with gcc-4.1.2 and glibc-2.5.

The link command line for my app specifies "-ljpeg" before "-lgs" so that I try and link to my copy of jpeglib first and then to Ghostscript.

Any help or advice on this situation is appreciated.

Thanks!

PS: I am not subscribed to this list so please CC: me on all responses. Thanks.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux