Opencv 2.4.9 -> OpenCV 3.0 imread transition [closed]

asked 2015-06-08 23:43:42 -0600

jpistorino gravatar image

I m using OpenCV 3.0 with VS2012 on a Win8.1 64 bit machine.

I am trying to transition form OpenCV 2.4.9 to OpenCV 3.0 and am having a problem finally linking the whole thing. My project worked fine in 2.4.9 and I think I fixed most everything that was different in 3.0. However, I now get a linking error on imread.

When compiling/linking, I get this:

1>------ Build started: Project: SVUSBCOMUtility, Configuration: Debug x64 ------
1 >Build started 6/8/2015 8:14:47 PM.
1>Touching "x64\Debug\SVUSBCOMUtility.unsuccessfulbuild".
1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
1>  All outputs are up-to-date.
1>  All outputs are up-to-date.
1>  Processing resource file "Form1.resX" into "x64\Debug\SVUSBCOMUtility.Form1.resources".
1>  All outputs are up-to-date.
1>cvImagesClass.obj : warning LNK4248: unresolved typeref token (0100001D) for 'CvFileStorage'; image may not run
1>FileClass.obj : error LNK2028: unresolved token (0A000B73) "class cv::Mat __cdecl cv::imread(class cv::String const &,int)" (?imread@cv@@$$FYA?AVMat@1@AEBVString@1@H@Z) referenced in function "public: __cdecl ColorTestPattern::ColorTestPattern(void)" (??0ColorTestPattern@@$$FQEAA@XZ)
1>FileClass.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::imread(class cv::String const &,int)" (?imread@cv@@$$FYA?AVMat@1@AEBVString@1@H@Z) referenced in function "public: __cdecl ColorTestPattern::ColorTestPattern(void)" (??0ColorTestPattern@@$$FQEAA@XZ)
1>C:\Users\Administrator\documents\visual studio 2012\Projects\SVUSBCOMUtility\x64\Debug\SVUSBCOMUtility.exe : fatal error LNK1120: 2 unresolved externals
1>Build FAILED.
1>Time Elapsed 00:00:01.73
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I assume this means that imread is not linked in correctly but am having trouble seeing where it might have moved to.

I hope my dumb questions might help others with the same issues.

Any help appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by StevenPuttemans
close date 2015-06-09 05:53:53.308313



are you linking opencv_imgcodecs.lib ? (new module in 3.0)

berak gravatar imageberak ( 2015-06-08 23:46:16 -0600 )edit

Success. Thanks so much. I did search for imread in the docs to see what library it was in but couldn't find it. Thanks again berak.

jpistorino gravatar imagejpistorino ( 2015-06-08 23:56:05 -0600 )edit