代码::Blocks:CMake生成的Makefile说;没什么可做的。”;

代码::Blocks:CMake生成的Makefile说;没什么可做的。”;,makefile,mingw,cmake,codeblocks,Makefile,Mingw,Cmake,Codeblocks,我刚刚在我的Win7 64机器上安装了Code::Blocks with MinGW,并尝试编译一个CMake生成的项目(即openclonk) 如果我跑 C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f "C:/Users/Julius/Documents/Visual Studio 2010/Projects/OpenClonk/Makefile" clonk 从cmd开始编译 显然,我想知道如何修复从C::B编译的问题。Code::Bl

我刚刚在我的Win7 64机器上安装了Code::Blocks with MinGW,并尝试编译一个CMake生成的项目(即openclonk)

如果我跑

C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f "C:/Users/Julius/Documents/Visual Studio 2010/Projects/OpenClonk/Makefile" clonk
从cmd开始编译


显然,我想知道如何修复从C::B编译的问题。

Code::Blocks正在执行以下操作:

make.exe -s -f <makefile> all
mingw32-make.exe -f <makefile> clonk
make.exe-s-f all
您正在手动执行此操作:

make.exe -s -f <makefile> all
mingw32-make.exe -f <makefile> clonk
mingw32-make.exe-f clonk
这里的主要区别很可能是make目标。重新配置代码::块以使clonk成为目标,而不是默认的all。或者,在makefile的顶部添加一个类似于
all:clonk
的目标(假设尚未定义
all
目标)


如果这不能解决您的问题,您可能还想调查调用
make.exe而不是
mingw32 make.exe
是否会产生影响(您可以在项目设置中对此进行重新配置)。

目标没有影响,从make.exe更改为mingw32-mage.exe就成功了。