Integrating exiv2 with Qt
- 
Hi, Your .pro file is wrong. You shouldn't link to .dll files but to .lib files. So for exiv2 it should be something like LIBS += -lexiv2Did you also check that you are using the same compiler everywhere ? That's pretty important on Windows. On a side note, there's no need to have several time the exact same folder you your LIBSline.@SGaist said in Integrating exiv2 with qt: Did you also check that you are using the same compiler everywhere ? That's pretty important on Windows. I have compiled it using msys and mingw. I am not able to get the mingw32 version I am using Qt installed from qt-opensource-windows-x86-mingw492-5.6.1-1.exe file. 
- 
Do you mean that you get that error 139 at startup ? 
- 
AFAIK, it means that it fails to load a .dll Do you have other dependencies ? 
- 
local/bin? On Windows ?
- 
Just to rule out the obvious, can you copy the exiv2 .dll in the same folder as the application and check whether the application starts ? 
- 
Just to rule out the obvious, can you copy the exiv2 .dll in the same folder as the application and check whether the application starts ? Sorry for the late reply!! Ya .. i have tried that already but gives the same error! In the mean time I actually have tried many libraries and all are having same problem. So I guess there is a problem in either the build or the way of including the library. I will brief you exactly what I have done and the versions. Build: - I have successfully build the source code in the qt project folder using --prefix option with msys terminal with mingw compiler.
 mingw32-g++.exe (GCC) 5.3.0 
 mingw32-gcc-5.3.0.exe (GCC) 5.3.0- 
I am using Qt installed from qt-opensource-windows-x86-mingw492-5.6.1-1.exe 
- 
I have added mingw32-g++.exe (GCC) 5.3.0 as the compiler manually 
- 
I have added the external library (libexiv2.dll.a) in Qtcreator via Add Library external library and static mode. 
- 
I have also added to the PATH variable you have suggested. 
 The .pro reads this: win32: LIBS += -L$$PWD/libs/exiv2build/lib/ -llibexiv2.dll INCLUDEPATH += $$PWD/libs/exiv2build/include DEPENDPATH += $$PWD/libs/exiv2build/includeIt still gives me the error During startup program exited with code 0x0000c139. Any suggestion on what might have gone wrong? 
- 
Do I understand understand correctly that you are trying to run application with libraries built with two different versions of MinGW ? 
- 
Do I understand understand correctly that you are trying to run application with libraries built with two different versions of MinGW ? 
- 
What image format is it ? 
- 
Can you provide an image that is in a more mainstream format ? 
- 
A screenshot of Dependency Walker's window might be simpler. 
- 
From a look at the text file. There's at least one architecture mismatch. Double check libexiv2, if I saw things correctly, it's a 64bit library and you are using a 32bit Qt. 
- 
From a look at the text file. There's at least one architecture mismatch. Double check libexiv2, if I saw things correctly, it's a 64bit library and you are using a 32bit Qt. Sorry for revoking the topic after a long time. I am using both 32 bit (QT and mingw). When I load the dll in dependency walker, these are the missing dlls. Kernel32.dll 
 MSVCRT.DLL
 PSAPI.DLL
 USER32.DLL
 WS2_32.DLLI am unable to find these in the mingw bin folder also. So where can i get these dll's so that I can manually add them ? 
- 
Except MSVCRT.dll which comes with the vcredist package from Microsoft, the others are all system dlls that you should not distribute. 
- 
Except MSVCRT.dll which comes with the vcredist package from Microsoft, the others are all system dlls that you should not distribute. 
