SOLVED anybody writing with Qt 5.3 using OpenCV3 on Windows 7 64 bit machine
-
Ok, I have gone from 4500+ errors down to 135. Here are the first five. They all are similar. Can't figure these out! Any guidance??
Error 1 error LNK2019: unresolved external symbol gzputs referenced in function "void __cdecl icvPuts(struct CvFileStorage *,char const *)" (?icvPuts@@YAXPEAUCvFileStorage@@PEBD@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV
Error 2 error LNK2019: unresolved external symbol gzgets referenced in function "char * __cdecl icvGets(struct CvFileStorage *,char *,int)" (?icvGets@@YAPEADPEAUCvFileStorage@@PEADH@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV
Error 3 error LNK2019: unresolved external symbol gzrewind referenced in function "void __cdecl icvRewind(struct CvFileStorage *)" (?icvRewind@@YAXPEAUCvFileStorage@@@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV
Error 4 error LNK2019: unresolved external symbol gzeof referenced in function "int __cdecl icvEof(struct CvFileStorage *)" (?icvEof@@YAHPEAUCvFileStorage@@@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV
Error 5 error LNK2019: unresolved external symbol gzclose referenced in function "void __cdecl icvCloseFile(struct CvFileStorage *)" (?icvCloseFile@@YAXPEAUCvFileStorage@@@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV -
This was an error. double tapped the enter key. sorry!
-
What do you mean by that ?
The missing symbols comes from zlib
-
I am TOTALLY lost. Please explain!
-
"What do you mean by that?" I assume you mean my comment about..."This was an error. double tapped the enter key. sorry!"... I pushed enter twice and it logged my comment twice. I deleted the comment and left that message./
Please explain how you think I can fix the errors with your comment...
"The missing symbols comes from zlib"
I'm totally lost here!!
Bob
-
Do you have a zlib.lib file in OpenCV somewhere ?
-
Good evening!
Yes I have zlib.lib in the following OpenCV2.4.9 (which is the one I am now trying to use).C:\OpenCV249\build\x86\vc12\staticlib
C:\OpenCV249\build\x86\vc11\staticlib
C:\OpenCV249\build\x86\vc10\staticlib
C:\OpenCV249\build\x64\vc12\staticlib
C:\OpenCV249\build\x64\vc11\staticlib
C:\OpenCV249\build\x64\vc10\staticlibI have been trying to use the path for the x64\vc12 and have substituted the last folded with \staticlib, \lib & \bin, individually of course. None seemed to correct the errors.
-
Found a minor typo in the PROPERTY PAGE in Visual C++. That caused the coding to NOT find the proper PATH.
However, I will still keep studying the difference, and proper coding, for Static and Dynamic Libraries!!
Thanks again for the assistance and help!!
Bob
-
One important point if you want to go static with Qt, you'll need a commercial license.
The advantage of static linking is that you don't need to deploy dlls with your application but at the cost of the size of the application. You also don't have the choice when updating, you have to rebuild everything.
The dynamic linking allows you to switch libraries easily if you need e.g. a more recent version of one of your dependencies (the binary compatibility must still be checked, but that's another point)
-
Ah ha! That would probably be the answer to another question I posted...
Would that be the reason the "Deploy" options in the Build category are grayed out? They turn on with a commercial license purchase?
-
AFAIK no, licensing itself doesn't matter
-
Well, that's NOT good news! That means I have another problem!!
See: