Page 1 of 1

Issue with creating shared library

Posted: 2011-02-17T10:35:30-07:00
by jvisu
Hi

I'm new to this form.

I created a shared library (libimconvert.so) using ImageMagick-6.3.0 to convert a image file in RHEL5 linux.
g++ -g -shared -o libimconvert.so imgconvert.cpp `Magick++-config --cppflags --cxxflags --ldflags --libs`
The libimconvert.so library is loading fine and the conversion is working fine but my program is giving segmentation fault when closing the library (dlclose).

When I created an application (imconvert.exe) instead of library it is working fine.
g++ -g -o imconvert.exe imgconvert.cpp `Magick++-config --cppflags --cxxflags --ldflags --libs`

Could any one help me what could be the problem with creating a shared library or did I missed anything.

Thanks in advance.

Regards
J.Visu

Re: Issue with creating shared library

Posted: 2011-02-17T11:10:04-07:00
by magick
Download the latest release of ImageMagick, 6.6.7-7 and install. If your program still fails, post the output of this command:
  • identify -list configure
Post a URL to your source code. We'll need to download it and reproduce the problem before we can offer a solution.

Re: Issue with creating shared library

Posted: 2011-03-11T23:50:19-07:00
by jvisu
Hi,

Thanks for the quick reply and Sorry from my side for the delayed response.

Its working with the new library.

Regards
JVisu