Open CV

Hi, may I know how to start an open CV program using Microsoft Visual Studio 2010 C++? I've try to run a some program from Internet but seem like not even a single one could help me in a very basic because my program does not run, I don't know whether it's my Windows bit problem or what? I use Windows 7 32 bit, the program is as below...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include <opencv/cv.h>
#include <opencv/cxcore.h>
#include <opencv/highgui.h>
using namespace std;
int main(int argc, char* argv[])
{
printf("Hello world\n");
IplImage *img = cvLoadImage("C:\21.jpg");
// Create a window
cvNamedWindow( "result",
CV_WINDOW_AUTOSIZE // allow window to resize to fit image true size
);
cvShowImage( "result", img ); // Show image in window already created
// Wait for a keystroke. If a positive argument is given, it will wait for
// that number of milliseconds and then continue. If 0 is given, the
// program will wait indefinitely for a keypress.
cvWaitKey(0);
// Clean up (not really necessary, but good programming practice)
cvReleaseImage( &img );
cvDestroyWindow("result");
system("PAUSE");
return EXIT_SUCCESS;
}


This is the error I got...



1>------ Build started: Project: 8, Configuration: Debug Win32 ------
1>Build started 10/2/2012 10:49:50 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\8.unsuccessfulbuild".
1>ClCompile:
1>  8.cpp
1>c:\program files\opencv2.3\build\include\opencv2\flann\logger.h(70): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen'
1>ManifestResourceCompile:
1>  All outputs are up-to-date.
1>LINK : fatal error LNK1104: cannot open file 'opencv_core230d.lib'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.95
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Topic archived. No new replies allowed.