所以,我在过去两周的大部分时间里都在试图让这个库运行,这样我就可以.mat
从 C++ 读取存储在文件中的变量,但遗憾的是没有用。我将一步一步地解释我到目前为止所做的事情,你可以告诉我我做错了什么,或者我是否遗漏了一些步骤:
- 我下载了 MATIO 库 ( https://sourceforge.net/projects/matio/ ) 并将其解压缩。
- 我下载了 CMake,打开
cmake-gui.exe
,选择正确的设置,配置它并生成构建文件。我尝试使用https://github.com/tbeu/matio#223-cmake-build-system中的给定行从命令提示符安装它,但我总是收到以下错误:
C:\Users\RS3\matio>cmake .
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:7 (project):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:7 (project):
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/RS3/matio/CMakeFiles/CMakeOutput.log".
See also "C:/Users/RS3/matio/CMakeFiles/CMakeError.log".
但是gui,没有任何问题/错误。
- 然后我打开了我的 IDE(我正在使用 Codelite IDE),将以下文件夹/目录放入我的编译器
C:\Users\RS3\matio\src
和C:\Users\RS3\matio\build\src
. 但我没有找到要链接到我的链接器的任何文件.dll
。.lib
我意识到我可能错过了安装步骤,但我完全不知道该怎么做。在C:\Users\RS3\matio\build
中,有一个名为 的文件cmake_install.cmake
,但是当我打开它时,它只是打开了cmake-gui.exe
,我在其中构建了库本身,没有什么新东西。
因此,我们将不胜感激任何帮助,因为我花了很多时间试图让这个库已经运行,我现在需要让它运行..提前致谢!