Updated by Alexander Shishkov about 13 years ago

Encountering a couple of errors building OpenCV [[OpenCV]] 2.2 when using CMake

1) Regardless of the "Debug Information Format" flag (/Z) you specify in CMake (for instance, if you change /Zi to /Z7), the generated project files will still have /Zi. This is only for the Release config. Debug respects the flag you specify the flag you set in CMake

2) If you uncheck "BUILD_SHARED_LIBS", the CVAPI_EXPORTS and HIGHGUI_EXPORTS still get defined, which they shouldn't. The CVAPI_EXPORTS is particularly bad because it causes DllMain [[DllMain]] to get compiled, which conflicts with the DllMain [[DllMain]] in MSVCRT, or any other dll you are building which defines DllMain [[DllMain]]

Back