我正在使用Windows 7 64位,并希望从命令行编译非预编译库(具体来说,我需要Filesystem)(我不使用MSVC).我有MinGW,但在Boost网站上读到不支持MSYS shell,所以我试图从Windows命令提示符编译库.
首先,运行bootstrap.bat会导致以下错误:
Building Boost.Jam build engine
'cl' is not recognized as an internal or external command,
operable program or batch file.
Failed to build Boost.Jam build engine.
Please consult bjam.log for furter diagnostics.
You can try to obtain a prebuilt binary from
http://sf.net/project/showfiles.php?group_id=7586&package_id=72941
Also, you can file an issue at http://svn.boost.org
Please attach bjam.log in that case.
Run Code Online (Sandbox Code Playgroud)
另外,boost_root目录中的任何位置都没有bjam.log文件.
忽略此错误,并尝试运行下载的bjam.exe文件,我收到另一个错误:
c:/boost_1_45_0/tools/build/v2/build\configure.jam:145: in builds-raw
*** argument error
* rule UPDATE_NOW ( targets * : log ? : ignore-minus-n ? …Run Code Online (Sandbox Code Playgroud) 我的问题与Boost和OpenCV库与Eclipse CDR的静态链接有些关系.错误,而我正在尝试做的比这里描述的更多:如何创建一个程序,可以使用Boost和OpenCV读取文件夹中的所有图像?,即使用Boost的文件系统库遍历目录,并使用OpenCV对图像文件进行一些处理.
我使用MinGW编译了文件系统和其他库,并尝试在Windows 7 64位系统上使用Eclipse CDT运行Boost 1.45,OpenCV 2.2和Eigen2.如果在项目中单独使用文件系统库,则编译和运行没有问题,但是与上面的其他两个库组合,我得到以下错误:
In file included from C:\boost_1_45_0/boost/filesystem/v3/path_traits.hpp:22:0,
from C:\boost_1_45_0/boost/filesystem/v3/path.hpp:25,
from C:\boost_1_45_0/boost/filesystem.hpp:32,
from ..\src\ComputeNatScaleFunction.cpp:18:
C:\boost_1_45_0/boost/type_traits/decay.hpp: In instantiation of 'boost::decay<cv::<anonymous enum> >':
C:\cmake_binaries\include/opencv2/core/operations.hpp:766:23: instantiated from here
C:\boost_1_45_0/boost/type_traits/decay.hpp:28:66: error: 'cv::' is/uses anonymous type
C:\boost_1_45_0/boost/type_traits/decay.hpp:28:66: error: trying to instantiate 'template struct boost::remove_reference'
C:\boost_1_45_0/boost/type_traits/decay.hpp:38:17: error: 'cv::' is/uses anonymous type
C:\boost_1_45_0/boost/type_traits/decay.hpp:38:17: error: trying to instantiate 'template struct boost::remove_reference'
C:\boost_1_45_0/boost/type_traits/decay.hpp: In instantiation of 'boost::decay<cv::<anonymous enum> >':
C:\cmake_binaries\include/opencv2/core/operations.hpp:917:21: instantiated from here
C:\boost_1_45_0/boost/type_traits/decay.hpp:28:66: error: 'cv::' is/uses …Run Code Online (Sandbox Code Playgroud) 我正在尝试在Windows 7(64位)上使用Cmake编译OpenCV.它将与Eclipse和CDT一起使用,我在其中阅读了您无论编译器如何都要指定Unix Makefile的地方.现在,鉴于我也有cygwin(对于Android NDK的东西),我首先尝试使用它的编译器,我成功配置CMake并生成makefile,但只有63%的编译,当OpenCV吐出错误时(关于ffmpeg和HMODULE).所以我切换到MinGW的(用的HelloWorld它也是一种痛苦,我必须指定一个完整路径MinGW的G ++不管PATH变量设置的),但现在我甚至不能配置CMake的.我收到以下错误:
The C compiler identification is GNU
The CXX compiler identification is GNU
CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found. Please set CMAKE_RC_COMPILER to a valid compiler path or name.
Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 (GET_FILENAME_COMPONENT):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:59 (enable_language)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (INCLUDE)
CMakeLists.txt:2 (PROJECT) …Run Code Online (Sandbox Code Playgroud)