OpenCV 4.1.2+VS17+Anaconda 3+Win10+[Win32!!]

尝试使用VS17和Anaconda 3在Win10上构建32位OpenCV 4.1.2时,遇到HDF5库冲突问题。所有库都成功构建,除了HDF5测试。Anaconda中的hdf5.lib是64位,导致链接错误。尽管如此,一个HDF示例仍然成功构建,但路径名称过长导致另一个错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Try to build 32 bit OpenCV library using the same scripts from previous time
OpenCV 4.1.2 with VS17 on Win10 with Anaconda 3 - Let’s see this time…

Results

  • “INstallation” folder not build (i.e. not installed) because no 64 bit hdf5.lib (see below). The script apparently requires ALL opencv modular library built successfully before proceeding to installation stage.
  • ALL other libraries built successfully except HDF5 test

Errors

  1. hdf5.lib from Anaconda is 64 bit (Because I only installed 64 bits Anaconda)
  • Downloaded Anaconda3-5.3.1-Windows-x86_64.exe on 28/11/2018 15:25

C:\ProgramData\Anaconda3\Library\lib\hdf5.lib : warning LNK4272: library machine type ‘x64’ conflicts with target machine type ‘x86’ [C:\Development\OpenCV_Installation_412-Win32\OpenCV-4.1.2-Win32\opencv\build\modules\hdf\example_hdf_create_groups.vcxproj]

C:\Development\OpenCV_Installation_412-Win32\OpenCV-4.1.2-Win32\opencv\build\bin\Release \example_hdf_create_groups.exe : fatal error LNK1120: **66 unresolved externals** [C:\Development\OpenCV_Installation_412-Win32\OpenCV-4.1.2-Win32\opencv\build\modules \hdf\example_hdf_create_groups.vcxproj]

  • However, the following HDF example is built successfully

Building Custom Rule C:/Development/OpenCV_Installation_412-Win32/OpenCV-4.1.2-Win32/opencv_contrib/modules/hfs/CMakeLists.txt
example.cpp
example_hfs_example.vcxproj -> C:\Development\OpenCV_Installation_412-Win32\OpenCV-4.1.2-Win32\opencv\build\bin\Release\example_hfs_example.exe

  1. Directory name too long…

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets (321,5): error MSB3491: Could not write lines to file “example_tutorial_porting_anisotropic_image_segmentation_gapi_fluid.dir\Release(sample).46332C7B.tlog(sample) porting_anisotropic_image_segmentation_gapi_fluid.lastbuildstate”.
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. [C:\Development\OpenCV_Installation_412-Win32\OpenCV-4.1.2-Win32\opencv\build\samples\cpp\example_tutorial_porting_anisotropic_image_segmentation_gapi_fluid.vcxproj]

  1. HDF5 test not build

C:\ProgramData\Anaconda3\Library\lib\hdf5.lib : warning LNK4272: library machine type ‘x64’ conflicts with target machine type ‘x86’ [C:\Development\OpenCV_Installation_412-Win32\OpenCV-4.1.2-Win32\opencv\build\modules\hdf\opencv_test_hdf.vcxproj]

C:\Development\OpenCV_Installation_412-Win32\OpenCV-4.1.2-Win32\opencv\build\bin\Release\opencv_test_hdf.exe : fatal error LNK1120: 66 unresolved externals [C:\Development\OpenCV_Installation_412-Win32\OpenCV-4.1.2-Win32\opencv\build\modules\hdf\opencv_test_hdf.vcxproj]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值