Issue with creating shared library
Posted: 2011-02-17T10:35:30-07:00
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
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