求助:Win10 64位下CMake配置Qt5.10与OpenCV3.4.1失败
Troubleshooting Missing
bin Folder in OpenCV Build for Qt 5.10 (Windows 10 x64) Hey there, let's work through this issue together. The missing bin folder after configuring OpenCV 3.4.1 with Qt 5.10 is usually tied to misconfigured CMake settings or incomplete build steps. Here are the most likely fixes:
1. Verify CMake Configuration Options
- Check Compiler Match: Ensure you're using a compiler compatible with Qt 5.10 — Qt 5.10 works best with MSVC 2015 64-bit (not MinGW, unless you've specifically built Qt with MinGW). When running CMake, make sure you select the correct x64 compiler variant (e.g., "Visual Studio 14 2015 Win64").
- Enable Build Targets: Double-check that you've enabled key build flags like
BUILD_opencv_world(bundles most OpenCV modules into a single DLL) or individual module build options. If you leave all module options unchecked, CMake won't generate the dynamic libraries that end up in thebinfolder. - Confirm Install Path: Verify the
CMAKE_INSTALL_PREFIXsetting in CMake — this is where the finalbin,lib, andincludefolders will be placed. If you didn't set this explicitly, the files might be in a subfolder of your build directory instead of the rootopencv-buildfolder.
2. Ensure You Run the INSTALL Build Target
Generating the project with CMake isn't enough — you need to explicitly build the INSTALL target to copy compiled files into the final directory:
- If using Visual Studio: Open the generated
.slnfile, find theINSTALLtarget in the Solution Explorer (under "CMakeTargets"), right-click it, and select "Build". This will populate thebinfolder with DLLs and executables. - If using MinGW: After running
cmake ..to generate makefiles, executemingw32-make install(not justmingw32-make). Theinstallcommand is what moves the compiled binaries into the specified install directory.
3. Check for 32/64 Bit Mismatches
Make sure every component is 64-bit:
- Your Qt 5.10 installation is 64-bit.
- The OpenCV source or pre-built files you're using are 64-bit.
- CMake is configured to build for x64 (not Win32). Mismatched architectures can cause incomplete builds or missing output folders.
4. Clear CMake Cache and Reconfigure
If you've tried multiple times, old cache settings might be causing conflicts:
- Delete all files and folders inside your
opencv-builddirectory. - Re-run CMake from scratch, carefully selecting each option (compiler, install path, build modules) to ensure no mistakes are carried over.
内容的提问来源于stack exchange,提问作者Ahmad Almunajed
相关产品推荐
相关产品推荐

