3

这是 Ada 的帖子的后续内容:绘制 2d 图表。我决定创建一个新帖子,因为这是一个单独的问题。PLplot for Windows 的安装位于:http ://www.miscdebris.net/plplot_wiki/index.php?title=Specifics_for_various_platforms#Windows 。安装如下:

cd plplot
mkdir buildmingw
cd buildmingw
cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=install ..
mingw32-make
mingw32-make install

我决定通过从http://sourceforge.net/projects/mingw/files/下载 exe 文件来进行 MinGW 灌输。我还在这里获得了适用于 Windows 的 cmake:http ://www.cmake.org/cmake/resources/software.html 。

现在,在运行安装 PLplot 的第四条指令(见上文)时,我得到:

C:\plplot-5.9.6\buildmingw>cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=ins
tall ..
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermine
CCompiler.cmake:44 (MESSAGE):
Could not find compiler set in environment variable CC:

cl.
Call Stack (most recent call first):
CMakeLists.txt:38 (project)


CMake Error: Error required internal CMake variable not set, cmake may be not be
built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be
built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:C:/plplot-5.9.6/buildmingw/CMakeFi
les/CMakeCCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

C:\plplot-5.9.6\buildmingw>

我在安装选项中选择让 cmake 创建必要的系统路径。我想知道为什么在安装过程中没有创建环境变量 CMAKE_C_COMPILER_ENV_VAR 和 CMAKE_C_COMPILER。有什么建议吗?

非常感谢..

4

1 回答 1

1

我不熟悉CMake,但常见问题解答中的一种方法如何使用不同的编译器?可能会有所帮助。我猜预构建的 Windows 二进制文件不知道你使用的是什么编译器,所以它必须依赖于CCCXX环境变量。

于 2010-07-10T13:35:10.140 回答