Reputation: 31
I've been successfully using OpenCV 3.3.0 in VS 2017 in 64-bit mode. I now need to switch to 32-bit mode. I installed and compiled the 32-bit version of OpenCV 3.4.3 (by meticulously following this link) I set all properties: o Copy opencv_world343.dll and opencv_world343d.dll from …\openCV_3.4.3\opencv_build\install\x86\vc15\bin into the project directory and also to the x86\ Release and Debug directories (after they will be created then the project is complied) o In the Solution Explorer right click on the top level project directory and go to properties-> C/C++ -> General -> Additional include directories and add ...\openCV_3.4.3\opencv_build\install\include and click apply o Then go to properties-> Linker -> General -> Additional library directories and add ...\openCV_3.4.3\opencv_build\install\x86\vc15\lib and apply o Then go to properties-> Linker -> Input -> Additional dependencies and add “opencv_world343.dll” for release mode and “opencv_world343d.dll” for debug mode.
I'm still getting a linker error "invalid or corrupt file: can not read at 0x390" pointing to opencv_world343d.dll in debug mode, same error in release mode pointing to opencv_world343.dll
Is this a bug in 3.4.3 OpenCV of am I doing something wrong?
Upvotes: 1
Views: 801
Reputation: 31
Sorry, never mind, I found the problem: the settings in the Linker -> Input -> Additional dependencies should point to opencv_world343.lib, not to opencv_world343.dll
Upvotes: 1