News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

make: *** No rule to make target `Debug'. Stop.

Started by fh.bui, May 03, 2011, 02:08:50 PM

Previous topic - Next topic

fh.bui

Hello everyone. I am a bloody new user of code::blocks.

I have some problems compiling a gtk+-project (v.1.x.x) using code::blocks.

I got this error from the build-log:

-------------- Build: Debug in surfwithcodeblock ---------------

Using makefile: Makefile
make: *** No rule to make target `Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings

While i was executing make and make install from the shell, i didnt get this error.

Can someone pls help me to solve this problem?







oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

fh.bui

Hello and thank you very much for your fast answer.
But the problems do still remain after binding the custom makefile into the project.

The custom makefile was directly generated after the execution of the configure script.
I have also tried to modify the make command for building the project.


stahta01

1. Rename the "Debug" target to match the makefile target or edit the makefile to have an "Debug" target
2. Search this site for other ways to do it.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Jenna

Quote from: stahta01 on May 04, 2011, 03:28:34 PM
1. Rename the "Debug" target to match the makefile target or edit the makefile to have an "Debug" target
2. Search this site for other ways to do it.

Tim S.

You have to fix "Project -> Build options -> Make commands" to fit your needs.

fh.bui

Thank you guys for your help. I will try the posted solution and state the result.

Eli_A

Hi,

I have the same problem.

I included the pcapplusplus.mk at my makefile:
include C:\Eli\Projects\dRDI\dRD_parser\mk\PcapPlusPlus.mk

Set the address at the PcapPlusPlus.mk as below:

PCAPPLUSPLUS_HOME := C:\pcapplusplus\pcapplusplus
MINGW_HOME := C:/MinGW/bin
PCAP_SDK_HOME := C:/WpdPack/include

Also, check the Custom make file and the make commands are as below:

$make -f $makefile $target
$make -f $makefile $file
$make -f $makefile clean$target
$make -q -f $makefile $target

But I get the below error:

mingw32-make.exe: *** No rule to make target 'Debug'.  Stop.

Can someone pls help me to solve this problem?

BlueHazzard


Eli_A

include ../mk/PcapPlusPlus.mk


# All Target
all:
   g++.exe $(PCAPPP_INCLUDES) -c -o main.o main.cpp
   g++.exe $(PCAPPP_LIBS_DIR) -static-libgcc -static-libstdc++ -o dRDI.exe main.o $(PCAPPP_LIBS)

# Clean Target
clean:
   del main.o
   del dRDI.exe

AndrewCot

I would suggest finding a site that has tutorials on makefiles so you can get up to speed with makefiles.

BlueHazzard

if you are using codeblocks with makefiles, codeblocks uses the below command to run your makefile
$make -f $makefile $target
as you can see at the end of the make call codeblocks adds the target name

In your case in the projct the target is called "Debug" and so codeblocks adds "Debug" at the end of the command line. In your makefile the targets are only "all" and "clean"

So you have to rename your targets in codeblocks:
Project->Properties->Build targets
select "Debug" and rename it to "all".
Then before compiling make sure you have selected the "all" target in the drop dow box near the compile button it the tool bar or go to Build->Select target->All