mikekov / ExifPro

Image browser and viewer
GNU General Public License v2.0
60 stars 15 forks source link

CMake error due to missing libjpeg-turbo.nsi.in #3

Open ahar23 opened 6 years ago

ahar23 commented 6 years ago

Hi, Building applications is not something I'm familiar with but I thought I'd give it a go... CMake 3.10.1 gave an error at the Generate stage due to /libs/libjpeg-turbo/release/libjpeg-turbo.nsi.in not existing (line 907 of CMakeLists.txt) I tried using libjpeg-turbo files downloaded from their Sourceforge site having guessed which version to use and that allowed the CMake procedure to appear to complete but then the steps performed in Visual Studio 2017 had errors and nothing was created in the ExifPro/bin folder. Should I have done something with NASM before the CMake steps? I didn't understand from the instructions if I needed to do something with that or if it just needed to be present so that CMake could use it. As you can probably guess, I don't really know what I'm doing. Can you help me out? Thank you

mikekov commented 6 years ago

I'm sorry for all those problems. They stem from the fact that .gitignore file excluded "release" folder from jpeg lib. I added missing files.

ahar23 commented 6 years ago

Hi, Thanks for updating the files. I went through the build instructions again and this time CMake didn't appear to have any problems. I used Visual Studio Community 2017 (15.5.2) to build the x64 Release configuration and in addition to 183 warnings I ended up with the folowing 3 errors:

Severity Code Description Project File Line Suppression State Error C2668 'Lua::PushValue': ambiguous call to overloaded function ExifPro ExprCalculator.cpp 365 Error C2668 'Lua::PushValue': ambiguous call to overloaded function ExifPro ExprCalculator.cpp 366 Error C2668 'Lua::PushValue': ambiguous call to overloaded function ExifPro ExprCalculator.cpp 367

I've got Windows SDK 10.0.16299.0. Is there something I need to do differently at this end to correct this? Thanks again.

mikekov commented 6 years ago

There's evidently some differences in types seen on my machine, but I shouldn't rely on date/time seconds/minutes/hours having any particular type. Added cast to int.

ahar23 commented 6 years ago

I think we're getting close! Just one error last time:

Severity Code Description Project File Line Suppression State Error LNK1181 cannot open input file ExifPro-master\libs\libjpeg-turbo\bin\Release\jpeg-static.lib' ExifPro ExifPro-master\src\LINK 1

Thanks again for your help with this.

mikekov commented 6 years ago

It looks like jpeg-turbo lib has not been built. You can try right clicking on it and selecting "Build". I've seen VS reporting unknown errors trying to build this project. I do not know why it fails at that step...

ahar23 commented 6 years ago

Hi, When you say click on it, what exactly is the it? Can I just check if there's some implied procedure I should be performing where the instructions say "First install NASM (http://www.nasm.us/) to build libjpeg-turbo SIMD project." Would a directory listing of what I end up with in the build folder after CMake has done its thing be useful? Thank you.

mikekov commented 6 years ago

libjpeg-turbo project in the Solution Explorer

mikekov commented 6 years ago

If libjpeg-turbo project is available, then CMake "has done its thing". I don't remember having to do anything special after installing NASM. I guess just as long a it is on a $PATH and accessible from command line, it's fine.

ahar23 commented 6 years ago

Hi, I had another go and it appears I did have to go into VS and build the libjpeg-turbo project before files including jpeg-static.lib appeared in ExifPro-master\libs\libjpeg-turbo\bin\Release\jpeg-static.lib After doing that and then opening ExifPro.sln and building, I no longer had that single error about jpeg-static.lib but instead ended up with 60 errors which are all either code LNK2001 or LNK2019 with messages that all begin "unresolved external symbol" on line 1 of various .obj files. There's also 1 warning "LNK4272 library machine type 'x86' conflicts with target machine type 'x64'" related to jpeg-static.lib

I don't know if it's relevant but one part of the instructions I can't exactly stick to is in CMake where it says "Press 'Configure' button. ENABLE_SHARD can be unchecked. Press 'Generate' button to create projects." On my PC I don't see the ENABLE_SHARED option to uncheck it until after I click on generate. It's then dispalyed and I can change it and click generate again but by this time there are already files created from the first click on generate. Could that be messing things up?

If there's any chance of getting hold of a successfully built installer, I'd really appreciate it! Thank you.

mikekov commented 6 years ago

After pointing CMake to libjpeg, click "Configure". In the dialog that pops up select VS 15 2017 Win64 and press Finish. Then only you'll see "ENABLE_SHARED" check box. Uncheck it. Press "Generate". Done.

To redo the steps delete CMakeCache.txt from ExifPro/libs/libjpeg-turbo/bin.

ahar23 commented 6 years ago

Unfortunatley I've been unable to get past the aforementioned errors when attempting to build the project and I can't afford to spend any more time on this right now. Please let me know if I could be provided with a ready-made installer. If not, I'll try to find someone else here to have a go at this. Thank you.

mikekov commented 6 years ago

Since Win32 build is broken, installer cannot be currently built. Sorry for disappointing news.