[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
Compiling OpenCV with eVC++
Create a DLL project and add these preprocessor definitions:
WIN32, _WINDOWS, CVAPI_EXPORTS, CV_DLL
Change the following files:
cxtypes.h - 08/11/2004 - line 157
#if defined WIN32 && defined _MSC_VER && !defined ARM
cxmisc.h - 08/11/2004 - line 130
#if ( _MSC_VER >= 1200 || defined __ICL ) && !defined ARM
cxerror.cpp - 08/06/2004 -
line 94 - insert (move subsequent line numbers accordingly)
#define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
line 111 - replace/insert
FatalAppExit -->
MessageBox( 0, L"Problem to allocate memory for TLS OpenCV context.", L"OpenCV", MB_ICONERROR);
exit(1);
line 175 - replace
char --> wchar_t title[100];
line 177 - replace
wsprintf --> sprintf( message, ...
line 184 - adapt string constant
wsprintf( title, L"OpenCV GUI Error ...
line 186 - insert
msg_len = strlen(message) + 1;
wchar_t* wmessage = (wchar_t*)alloca(msg_len * sizeof(wchar_t));
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, message, -1, wmessage, msg_len);
line 186 - replace
int answer = MessageBox( NULL, wmessage, title, MB_ICONERROR|MB_ABORTRETRYIGNORE /*|MB_SYSTEMMODAL*/ );
line 362 - replace
BOOL WINAPI DllMain( HINSTANCE -->
BOOL WINAPI DllMain( HANDLE