Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cannot get opencv 3.0 to work

Hi, I have a fatal unresolved external error when I'm trying to compile programs in opencv 3.0.0. Now I know that this question was asked many times but my problem is specific.

  • I installed opencv 3.0.0 in the "C:\" directory.
  • I created an empty project in Visual Studio 2012 (win32 console application).
  • I entered into the properties of the project's solution, and added the directory "C:\opencv\build\include" in "Additional Include Directories".
  • In the Linker, I added the directory "C:\opencv\build\x64\vc12\lib" in "Additional Library Directories" (I'm working with a 64-bit operating system). Then I added the files "opencv_ts300d.lib" and "opencv_world300d.lib" in "Additional Dependencies" (I'm working only in debug mode).

As far as I know these are the steps needed in order to run programs in opencv 3.0.0. But when I wrote the following code

include "opencv2\core\core.hpp"

include "opencv2\highgui\highgui.hpp"

using namespace cv;

void main()

{

Mat img = imread("C:/BlackWhite.jpg", CV_LOAD_IMAGE_UNCHANGED);
getchar();

}

I get an unresolved external for the function "imread". Why is that? Please I will be grateful for any answer I can get. Thanks in advance.

click to hide/show revision 2
No.2 Revision

Cannot get opencv 3.0 to work

Hi, I have a fatal unresolved external error when I'm trying to compile programs in opencv 3.0.0. Now I know that this question was asked many times but my problem is specific.

  • I installed opencv 3.0.0 in the "C:\" directory.
  • I created an empty project in Visual Studio 2012 (win32 console application).
  • I entered into the properties of the project's solution, and added the directory "C:\opencv\build\include" in "Additional Include Directories".
  • In the Linker, I added the directory "C:\opencv\build\x64\vc12\lib" in "Additional Library Directories" (I'm working with a 64-bit operating system). Then I added the files "opencv_ts300d.lib" and "opencv_world300d.lib" in "Additional Dependencies" (I'm working only in debug mode).

As far as I know these are the steps needed in order to run programs in opencv 3.0.0. But when I wrote the following code

include "opencv2\core\core.hpp"

"opencv2\core\core.hpp" include "opencv2\highgui\highgui.hpp"

"opencv2\highgui\highgui.hpp" using namespace cv;

cv; void main()

{

main()
{
Mat img = imread("C:/BlackWhite.jpg", CV_LOAD_IMAGE_UNCHANGED);
 getchar();

}

}

I get an unresolved external for the function "imread". Why is that? Please I will be grateful for any answer I can get. Thanks in advance.