Ada:在Windows上安装cmake和PLplot

时间:2010-07-10 06:40:48

标签: graph cmake ada failed-installation

这是Ada: plotting 2d graphs帖子的后续跟进。我决定创建一个新帖子,因为这是一个单独的问题。 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。有什么建议吗?

非常感谢..

1 个答案:

答案 0 :(得分:1)

我不熟悉CMake,但常见问题解答How do I use a different compiler?中的其中一种方法可能有所帮助。我猜测预先构建的Windows二进制文件无法知道您正在使用的编译器,因此它必须依赖于CCCXX环境变量。