- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试清理legacy C-FORTRAN FLOSS code,并且遇到了一个非常奇怪的错误。通过top add_subdirectory
file中的CMakeLists.txt
添加了一些库/文件夹。在cmake ..
文件夹中运行build
命令会成功生成MakeFile
(除了some minor warnings可能为假阳性)。但是,当使用make
进行编译时,出现了一个奇怪的错误:
Scanning dependencies of target umfpackmingw32-make[2]: Leaving directory '/path/to/elmerfem/build'mingw32-make[2]: Entering directory '/path/to/elmerfem/build'[ 46%] Building C object umfpack/src/umfpack/CMakeFiles/umfpack.dir/umfpack_timer.c.omingw32-make[2]: *** No rule to make target '/mingw64/include/cblas.h', needed by 'umfpack/src/umfpack/CMakeFiles/umfpack.dir/umfpack_tictoc.c.o'. Stop.mingw32-make[2]: Leaving directory '/path/to/elmerfem/build'mingw32-make[1]: *** [CMakeFiles/Makefile2:265: umfpack/src/umfpack/CMakeFiles/umfpack.dir/all] Error 2mingw32-make[1]: Leaving directory '/path/to/elmerfem/build'mingw32-make: *** [Makefile:163: all] Error 2
which I don't know how to debug. In this case the /mingw64/include/cblas.h
exists, and the prior CMake outputs:
-- Looking for Fortran sgemm-- Looking for Fortran sgemm - found-- Found BLAS: /mingw64/lib/libopenblas.dll.a-- Looking for Fortran cheev-- Looking for Fortran cheev - found-- A library with LAPACK API found.-- -------------------------------------------------- BLAS library: /mingw64/lib/libopenblas.dll.a-- LAPACK library: /mingw64/lib/libopenblas.dll.a
Show that BLAS
and LAPACK
have been successfully found.
I would appreciate it if you could help me know what is the problem and how I can fix it. Thanks for your kind support in advance.
The environment is:
P.S.1. I just tested the code on macOS and it compiled with no problem. So it seems to be a Windows/MSYS2 specific problem.
P.S.2. I was told that I should install suitesparse
library so I did
pacman -S mingw64/mingw-w64-x86_64-suitesparse
最佳答案
运行mingw64.exe
(不是msys2.exe
)。
确保安装以下软件包:mingw-w64-x86_64-cmake
mingw-w64-x86_64-make
mingw-w64-x86_64-suitesparse
和C/C++,Fortran编译器。
注意:所有已安装的软件包必须在mingw64目录中。
更改CMakeLists.txt中的WITH_MPI
值:
SET(WITH_MPI FALSE ...
$ where cmake.exe
和
$ where mingw32-make.exe
alias
命令:
alias my_cmake=/d/msys64/mingw64/bin/cmake.exe
alias my_make=/d/msys64/mingw64/bin/mingw32-make.exe
my_cmake -G "MinGW Makefiles" ..
my_make
关于cmake - 通过 `add_subdirectory`添加的库遇到 “No rule to make target while compiling..”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61164034/
简介: 我正在尝试使用 CMake 获取跨平台编译脚本(适用于 Windows32 上的 VS 9.0 和适用于 Unix 的 Makefile)。 我遇到了关于 add_subdirectory()
这个问题在这里已经有了答案: CPack: Exclude INSTALL commands from subdirectory (googletest directory) (3 个回答) 去年关闭
我刚刚将一个较大的项目从 Visual Studio 解决方案迁移到 CMake,我注意到一个奇怪的行为。我有类似以下结构的东西: project/CMakeLists.txt project/cod
我正在使用以下内容编写 CMakeLists.txt: project(FullLibrary C) enable_language(C ASM) cmake_minimum_required(VER
我基本上问的问题与问过的问题相同 here .然而,这个问题还没有得到回答。 我想在我的项目中使用 googletest。为此,我使用 ExternalProject_Add(),它使用 git 克隆
我目前有以下架构 `-- system |-- CMakeLists.txt |-- dll | |-- CMakeLists.txt | |-- UnixDL
假设我有一个使用 cmake 的 C++ 单元测试项目,如下所示: $ tree . ├── C-API-ConditionVariable-unit-test │ ├── C-API-Condi
我正在关注 this教程,以便使用 C++ 在我的 android 项目中实现 firebase。我已按照教程所示的所有步骤进行操作,但是当我运行我的项目时,我收到此错误消息: CMake Erro
我有以下项目/源结构: MyProject |-MyProject | |-src | | |-project.c | | | |-CMakeLists.txt | |-MyLibrary |-i
我有一些项目遵循这个依赖关系图: Executable Main Libraries A, B, and C Main //_Depends_A_B_C A //_Depends_B B C //De
在一个项目中,我有一个外部依赖项(一个库)。这是可选的,但不太可能已经在系统上,并且可能会发生很大变化 所以我所做的是 find_package 库,如果找不到(包括特定版本)我从 Github 下载
我有一个要使用 OpenCV 和 googletest 构建的应用程序。使用我得到的 CMakeLists.txt,我得到一个无限循环,其中 CMake 不断将 googletest 目录添加到构建目
这可能是一个 xy 问题,所以这是我的情况。 背景 我有以下项目结构: -project -examples -example_that_uses_mylib_1
我有一个依赖于 Google 测试库的 CMake 项目。 我已经使用 ExternalProject_Add 添加了 Google 测试和 add_subdirectory如此处所述( https:
我正在尝试使用依赖于第三方库的 CMake 构建程序。这个第三方库包含一个 CMakeLists.txt 文件,所以我想做的是将第三方库的源代码保存在我的项目目录中,并使用 add_subdirect
我有一个这样的项目结构,我希望使用 CMake 构建它。 root\ | |--crystal\ | | | |--include\ Math.h, Window.h |
我有一个包含多个子目录的 C++ 项目,例如 src/ CMakeLists.txt main.cpp module1/ CMakeLists.txt code.cpp
我正在学习 CMake 以构建 C++ 代码,并在以下概念中苦苦挣扎。在我的根目录中,我有一些 cpp 文件和一个 CMakeLists.txt,它成功地在 gen-cpp 目录中生成了一些 Thri
我正在尝试将 Google Test 集成到更大项目的子项目中,但找不到令我满意的解决方案。 我有两个约束: Google Test 的源代码已经在项目结构中的某处(因此无法使用 URL 从 git
我的顶级 CMake 项目依赖于 some-library,我使用它包含在我的项目中 add_subdirectory (some-library) 然后使用链接到它 target_link_libr
我是一名优秀的程序员,十分优秀!