I am using Qt 4.5 (on VS 2008) which has been built dynamically(debug and release). I have linked my app to the <QTDIR>\plugins\imageformats\qgifd4.lib.

I create a QImage from a gif file on disk. But the QImage returned is null. I logged the loading of the gif plugin using QT_DEBUG_PLUGINS flag. The gif plugin logs are as below

'MyApp.exe': Loaded 'C:\Qt\VS45\qt\plugins\imageformats\qgifd4.dll', Symbols loaded.
'MyApp.exe': Unloaded 'C:\Qt\VS45\qt\plugins\imageformats\qgifd4.dll'

I also debugged the creation of QImage. In the function createReadHandlerHelper() the code looks like this
QFactoryLoader *l = loader();
QStringList keys = l->keys();

after this when the code searches for the "gif" extension in these keys nothing is found.
Does it mean that the gif plugin is corrupt? What am I doing wrong? Please help!! I have stuck here for a long time.