Errors in MSVC project files produced by CMake (Bug #946)
Description
Encountering a couple of errors building 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 to get compiled, which conflicts with the DllMain in MSVCRT, or any other dll you are building which defines DllMain
Associated revisions
Merge pull request #946 from bitwangyaoyao:2.4_samples2
Merge remote-tracking branch 'origin/2.4' into merge-2.4
Merged pull requests:
#890 from caorong:patch-1
#893 from jet47:gpu-arm-fixes
#933 from pengx17:2.4_macfix_cont
#935 from pengx17:2.4_filter2d_fix
#936 from bitwangyaoyao:2.4_perf
#937 from bitwangyaoyao:2.4_fixPyrLK
#938 from pengx17:2.4_surf_sample
#939 from pengx17:2.4_getDevice
#940 from SpecLad:autolock
#941 from apavlenko:signed_char
#946 from bitwangyaoyao:2.4_samples2
#947 from jet47:fix-gpu-arm-build
#948 from jet47:cuda-5.5-support
#952 from SpecLad:jepg
#953 from jet47:fix-bug-3069
#955 from SpecLad:symlink
#957 from pengx17:2.4_fix_corner_detector
#959 from SpecLad:qt4-build
#960 from SpecLad:extra-modules
Conflicts:
modules/core/include/opencv2/core/core.hpp
modules/gpu/CMakeLists.txt
modules/gpu/include/opencv2/gpu/device/vec_math.hpp
modules/gpu/perf/perf_video.cpp
modules/gpuimgproc/src/cuda/hough.cu
modules/ocl/include/opencv2/ocl/ocl.hpp
modules/ocl/src/pyrlk.cpp
samples/gpu/driver_api_multi.cpp
samples/gpu/driver_api_stereo_multi.cpp
samples/ocl/surf_matcher.cpp
History
Updated by Alexander Shishkov about 13 years ago
- Description changed from Encountering a couple of errors building [[OpenCV]] 2.2 when using CMake 1) ... to Encountering a couple of errors building OpenCV 2.2 when using CMake 1) Rega... More
Updated by Alexander Shishkov almost 13 years ago
- Target version deleted ()
Updated by Andrey Kamaev almost 13 years ago
Thanks for reporting!
1) Changing /Zi to /Z7 works fine for me with the latest trunk. Probably the issue is already fixed.
2) Was fixed some time ago. Now both macro are unset on switching to static build.
- Status changed from Open to Done
- Assignee set to Andrey Kamaev
Updated by Alexander Shishkov almost 13 years ago
- Target version set to 2.4.0