我一直在按照this程序安装Allegro.E Everything一切正常,直到我到达第3点,我必须运行这些命令
cd C:\devel\a5_sourcepack\zlib
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=C:\MinGW -G "MinGW Makefiles"
mingw32-make install
我尝试使用现有的构建目录并运行以下命令,但它给了我
C:\devel\a5_sourcepack\zlib\build>cmake .. -DCMAKE_INSTALL_PREFIX=C:\MinGW -G "MinGW Makefiles"
CMake Error: The current CMakeCache.txt directory C:/devel/a5_sourcepack/zlib/build/CMakeCache.txt is different than the directory c:/dev/a5_sourcepack/zlib/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "C:/devel/a5_sourcepack/zlib/CMakeLists.txt" does not match the source "C:/dev/a5_sourcepack/zlib/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
我甚至试图运行最后一个命令mingw32-make install
,但它告诉我没有这样的命令。
答案 0 :(得分:-1)
删除构建目录并重新创建(使用mkdir
)。或者,从构建目录中删除所有文件。
然后使用所需的参数执行cmake
命令。
错误消息不言自明:您似乎首先在C:/dev/a5_sourcepack/zlib
下拥有源代码并尝试在build/
子目录中构建它们。然后将源移动到C:/devel/a5_sourcepack/zlib
(可能通过将dev
目录重命名为devel
)。
但是一旦创建了CMake构建文件(在运行cmake ...
上),就不应该移动源目录和构建目录。否则构建文件将变为无效。