Author Topic: how to fix --- mingw32-make.exe: *** No rule to make target `Debug'. Stop  (Read 25510 times)

Offline zz

  • Single posting newcomer
  • *
  • Posts: 3
I have a very simple program like this:

#include <iostream>
int main() { std::cout << "test";};

However, when I use a makefile like below, I got the error  "mingw32-make.exe: *** No rule to make target `Debug'.  Stop"    Will anyone kind enough to point me to the right direction.  Thanks for any tips.


.PHONY: all
all: hello

# This rule tells make how to build hello from hello.cpp
hello: hello.cpp
   g++ -o hello hello.cpp

# This rule tells make to copy hello to the binaries subdirectory,
# creating it if necessary
.PHONY: install
install:
   mkdir -p binaries
   cp -p hello binaries

# This rule tells make to delete hello and hello.o
.PHONY: clean
clean:
   rm -f hello

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9595
No rule to make target `Debug'.
Well your Makefile doesn't have a target named "Debug" - it is as simple as that. It has the targets "all", "hello" and "install" though. The Project's target name will be used with Makefile to address a specific target. (Note that Makefiles can have many targets, so there is a need to call a specific one.) Read yourself into the topic of Makefiles and correct the Makefile or just rename the target of you project you are compiling to match the target you want to address in the Makefile.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Or remove the $target in the make-options tab of the projects build-options, if you want to use the default target of the makefile.