我一直在关注this程序安装Allegro.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
,但它告诉我没有这样的命令。
删除构建目录并重新创建它(使用mkdir
)。或者,从构建目录中删除所有文件。
然后使用所需的参数执行cmake
命令。
错误消息是不言自明的:似乎你首先在C:/dev/a5_sourcepack/zlib
下有源并尝试在build/
子目录中构建它们。然后你将源移动到C:/devel/a5_sourcepack/zlib
(可能,通过将dev
目录重命名为devel
)。
但是一旦创建了CMake构建文件(在运行cmake ...
上),就不应该移动源目录和构建目录。否则构建文件将变为无效。