[Sharing] Using Exiv2 for QT (msvc2013)
Recently I had issue using exiv2 for QT. As an beginner in programming, I made many mistakes along the way. However, I'm glad that I met Robin online, and he did not hesitate to help me in solving the problem I faced.
I am writing this post so beginners like me can take as a reference.
Mistakes I made:
I was using msvc2013 for QT, but googling around, I chose MinGW to compile and build my library and .DLL files. Please take note of what your QT version is, there is MinGW version for QT as well, but pls be sure about which version you were using.
The library and .DLL files were not linked properly. A bad habit that I'm determined to change is that the paths to the library and .DLL files were on the old MinGW path, I have replaced the old .DLL and library file with my visual studio compiled version, but it will be confusing.
Here are the steps that I think should be followed:
i. Use the lastest trunk and open msvc2005 sln with Microsoft visual studio 2013
ii. Download the expat and zlib and rename the folder according to the error shown on visual studio 2013 (For example, expat-2.2.0 folder name has to renamed to expat, depending on what error is shown)
iii. Compile and generate the .DLL and .lib for 32bit/64bit depending on program platform
iv. Link the .lib inside .pro file on QT, put it in a nice folder inside the program
v. Copy the include folder to it and include it on .pro file on QT
vi. Copy the .DLL onto the debug folder, or wherever the .EXE located at
vii. Use the following to check:
a. Exiv2::ExifData exifData;
b. exv_grep_keys_t keys;
c. Exiv2::dumpLibraryInfo(std::cout, keys);
It should print a list of adobe stuff on the console
Lastly, a big shout out to Robin Mills for all the help and guidance, patiently teaching me all the ways to troubleshoot my problem. Thank you Sir.