I am using visual studio c++ 2010&2013 installed in my system. I am trying to run the example code show in link Link to install opencv 2.4.3I configured as exactly like mentioned above. I am having open CVbeta3.0.0 & version 2.4.10.
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
Mat im = imread("c:/full/path/to/lena.jpg");
if (im.empty())
{
cout << "Cannot load image!" << endl;
return -1;
}
imshow("Image", im);
waitKey(0);
}
As mentioned i changed linker from
opencv_calib3d243d.lib
opencv_contrib243d.lib
opencv_core243d.lib
opencv_features2d243d.lib
opencv_flann243d.lib
opencv_gpu243d.lib
opencv_haartraining_engined.lib
opencv_highgui243d.lib
opencv_imgproc243d.lib
opencv_legacy243d.lib
opencv_ml243d.lib
opencv_nonfree243d.lib
opencv_objdetect243d.lib
opencv_photo243d.lib
opencv_stitching243d.lib
opencv_ts243d.lib
opencv_video243d.lib
opencv_videostab243d.lib
To
opencv_calib3d2410d.lib
opencv_contrib2410d.lib
opencv_core2410d.lib
opencv_features2d2410d.lib
opencv_flann2410d.lib
opencv_gpu2410d.lib
opencv_haartraining_engined.lib
opencv_highgui2410d.lib
opencv_imgproc2410d.lib
opencv_legacy2410d.lib
opencv_ml2410d.lib
opencv_nonfree2410d.lib
opencv_objdetect2410d.lib
opencv_photo2410d.lib
opencv_stitching2410d.lib
opencv_ts2410d.lib
opencv_video2410d.lib
opencv_videostab2410d.lib
When i compile code fully i get below error
1>------ Build started: Project: Track, Configuration: Debug Win32 ------ 1> moving.cpp 1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cwchar(29): error C2039: 'swprintf' : is not a member of '
global namespace'' 1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cwchar(29): error C2873: 'swprintf' : symbol cannot be used in a using-declaration 1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cwchar(30): error C2039: 'vswprintf' : is not a member of '
global namespace'' 1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cwchar(30): error C2873: 'vswprintf' : symbol cannot be used in a using-declaration ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
please let me know how can i resolve the issue.
// cwchar standard header
#pragma once
#ifndef _CWCHAR_
#define _CWCHAR_
#include <yvals.h>
#ifdef _STD_USING
#undef _STD_USING
#include <wchar.h>
#define _STD_USING
#else /* _STD_USING */
#include <wchar.h>
#endif /* _STD_USING */
typedef mbstate_t _Mbstatet;
#if _GLOBAL_USING && !defined(RC_INVOKED)
_STD_BEGIN
using _CSTD _Mbstatet;
using _CSTD mbstate_t; using _CSTD size_t; using _CSTD tm; using _CSTD wint_t;
using _CSTD btowc; using _CSTD fgetwc; using _CSTD fgetws; using _CSTD fputwc;
using _CSTD fputws; using _CSTD fwide; using _CSTD fwprintf;
using _CSTD fwscanf; using _CSTD getwc; using _CSTD getwchar;
using _CSTD mbrlen; using _CSTD mbrtowc; using _CSTD mbsrtowcs;
using _CSTD mbsinit; using _CSTD putwc; using _CSTD putwchar;
using _CSTD swprintf; using _CSTD swscanf; using _CSTD ungetwc;
using _CSTD vfwprintf; using _CSTD vswprintf; using _CSTD vwprintf;
using _CSTD wcrtomb; using _CSTD wprintf; using _CSTD wscanf;
using _CSTD wcsrtombs; using _CSTD wcstol; using _CSTD wcscat;
using _CSTD wcschr; using _CSTD wcscmp; using _CSTD wcscoll;
using _CSTD wcscpy; using _CSTD wcscspn; using _CSTD wcslen;
using _CSTD wcsncat; using _CSTD wcsncmp; using _CSTD wcsncpy;
using _CSTD wcspbrk; using _CSTD wcsrchr; using _CSTD wcsspn;
using _CSTD wcstod; using _CSTD wcstoul; using _CSTD wcsstr;
using _CSTD wcstok; using _CSTD wcsxfrm; using _CSTD wctob;
using _CSTD wmemchr; using _CSTD wmemcmp; using _CSTD wmemcpy;
using _CSTD wmemmove; using _CSTD wmemset; using _CSTD wcsftime;
using _CSTD vfwscanf; using _CSTD vswscanf; using _CSTD vwscanf;
using _CSTD wcstof; using _CSTD wcstold;
using _CSTD wcstoll; using _CSTD wcstoull;
_STD_END
#endif /* _GLOBAL_USING */
#endif /* _CWCHAR_ */
/*
* Copyright (c) 1992-2013 by P.J. Plauger. ALL RIGHTS RESERVED.
* Consult your license regarding permissions and restrictions.
V6.40:0009 */
This part where it goes to when i click error line