Solved Unable to build DiffImg project
-
@bitsystem
The readme says- Windows (tested on XP/Seven x64)
Opencv and qwt are bundled for practicality
Use qtcreator, cmake or the Visual Qt plugin
There a NSI script for building a setup.exe file in the setup directoryBut it fails to mention which visual studio it expects and Qt 4.8.X seems to want 2008 or 2010
https://download.qt.io/official_releases/qt/4.8/4.8.7/I dont think mingw is supported at all.
It needs the following libs which seems more happy about VS than mingw on windows.
I only have vs2015 installed and that did not work well as i only have Qt5.X installed so tons of
Qt4->Qt5 errors.So to build it, i think you need a working Qt4.8.7 + visual studio 2010 installed.
(or spend the time porting it to newer Qt + vs compiler)You could also compile your own Qt with other vs compiler.
https://stackoverflow.com/questions/32848962/how-to-build-qt-4-8-6-with-visual-studio-2015-without-official-supportWhat VS do you have installed?
-
I have VS 2015
-
Ok, with Qt 4.8.6/7 ?
Unless you want to port it to Qt5, then you will need a Qt4 that works with vs2015
There is none to download. so you must build it yourself and i just tried and it gave errors so
might be up hill.Any change you can get vs2010 ?
-
Well, It seems I Need to install Vs 2010 in order to build the project. Ok, I'll try to install this version and for sure I'll tell you if I'll solve the issue. Thank you very much.
-
@bitsystem
Well it will be easier as Qt4.8.X has a vs2010 version
so with a bit of luck. it will just work.
https://download.qt.io/official_releases/qt/4.8/4.8.7/qt-opensource-windows-x86-vs2010-4.8.7.exeThe build docs for linux mentions Qt4 so I assume its that version.
-
Hi,
Qt 4 is really not that hard to compile on Windows, you should go on with VS2015 and build the whole thing.
Depending on what you need that project for, there might be more recent alternatives.
-
SGaist, what do you mean?
Simply, I need to build and run the project I've linked.
As I've already saym I've VS 2015 installed, however it seems impossible to build that project because many errors occurs (please, see all thread).If you are right, you should be able to compile DiffImg project, if so, please, tell me how you do this :)
-
@bitsystem You're using Qt 4 this is not working with VS2015 as it was built with an older VS (different Microsoft compiler are not compatible with each other). @SGaist suggested you to compile Qt 4 by yourself with VS2015 if you want to use VS2015.
-
I've tried to follow the suggestion by mrjj without luck.
The type of errors changes, but there's no way to build correctly the code.
Visual Studio 2010
QT 4.8.7Nothing to do. I'm sorry. However, thank everyone for helping me.
-
@bitsystem
you tried to compile or own version of Qt ? -
I've tried to compile the project by using VC++ 2010 compiler and QT 4.8.7 which I've downloaded yesterday..
-
@bitsystem
That should work pretty ok.
You are not showing the actual errors you get so its hard to see if we are close or far,far away.You did install the Qt 4.8 - 2010 version yes?
(qt-opensource-windows-x86-vs2010-4.8.7.exe) -
Ok, I'll tell you every step I've done:
1 - Build on root project with error: cannot open file 'opencv_imgproc.lib'
2 - So, manually I go on 3rdparty folder and copy all *.lib files within "debug" folder I've defined, then I try to build again, but I get another error: cannot open file z.lib.
3 - I notice that doesn't exists any z.lib, instead I've a library which name is zlib.lib. So, manually, I open Makefile.apps.Debug file, and replace z.lib occurence with zlib.lib. Then, I try to build one time again and I get two errors:
tiff.lib(tif_win32.obj) : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function _Win32WarningHandler
tiff.lib(tif_win32.obj) : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function _Win32WarningHandler
So, at this poin I really don't know what could I try again..
-
@bitsystem
Hi
Before you try the project.
Please try to make a standard GUI application to see if your new kit is workingAlso, all dependencies seems to have a .pro file to build them.
About the error
unresolved external symbol __imp__MessageBoxAtry to insert
win32:LIBS += -luser32in the. pro file.
-
Perfect!
Now it seems build correctly with win32:LIBS += -luser32 instruction.mryy you have been precious.
Thank you very much!
-
@bitsystem
Really ?
Good work!!\o/