namespace Vas
{
/// <summary>
/// Initializes a new instance of the <see cref="Image"/> class.
/// </summary>
Image::Image(int width, int height)
{
_mat = new cv::Mat(height, width, CV_8UC4);
}
///
void Image::Save(System::String^ path)
{
std::string str = msclr::interop::marshal_as<std::string>(path);
cv::imwrite(str, *_mat);
}
}
when i build this code, winuser.h is error like this:
error C2143: syntax error : missing ';' before '__stdcall'
error C2143: syntax error : missing ';' before '__stdcall'
error C2146: syntax error : missing ')' before identifier 'hDesktop'
error C2146: syntax error : missing ')' before identifier 'hDesktop'
error C2146: syntax error : missing ')' before identifier 'hDesktop'
error C2146: syntax error : missing ')' before identifier 'hDesktop'
error C2146: syntax error : missing ';' before identifier 'hdesk'
error C2377: 'HDESK' : redefinition; typedef cannot be overloaded with any other symbol error C2440: 'initializing' : cannot convert from 'HDESK' to 'BOOL'
error C2440: 'initializing' : cannot convert from 'HDESK' to 'BOOL'
error C2440: 'initializing' : cannot convert from 'HDESK' to 'BOOL'
error C2440: 'initializing' : cannot convert from 'HDESK' to 'BOOL'
i try to found winuser.h or windows.h and i want to remove from my file, but i cannot foud it.
can come one tell me, why the error is come? and how to solve it? i'm already search on google and still cannot found the answer