No rule to make target

General questions regarding the usage of CodeLite
GCB-Toronto
CodeLite Enthusiast
Posts: 16
Joined: Tue Dec 20, 2011 10:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

No rule to make target

Post by GCB-Toronto »

I am getting the following error when I right-click -> "Compile", for example, the deflate.c module in my project.

----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "gzip4.mk" Debug/GZIP4_deflate.obj"
----------Building project:[ gzip4 - Debug ] (Single File Build)----------
mingw32-make.exe: *** No rule to make target `Debug/GZIP4_deflate.obj'. Stop.
----------Build Ended----------
0 errors, 0 warnings

I created the project by New Workspace, and New Project, then using "Add Existing File" to add the source files and header files into the project.

I have included my make file and project file below

Gerry

=================
MAKEFILE gzip2.mk
=================

##
## Auto Generated makefile by CodeLite IDE
## any manual changes will be erased
##
## Debug
ProjectName :=gzip4
ConfigurationName :=Debug
IntermediateDirectory :=Debug
OutDir := $(IntermediateDirectory)
WorkspacePath := "C:\GB\PROGRAMS-VC\gzip4\gzip4"
ProjectPath := "C:\GB\PROGRAMS-VC\gzip4"
CurrentFileName :=
CurrentFilePath :=
CurrentFileFullPath :=
User :=gblaney
Date :=4/24/2013
CodeLitePath :="C:\Program Files\Linux\CodeLite"
LinkerName :=link.exe /nologo
ArchiveTool :=lib.exe /nologo
SharedObjectLinkerName :=link.exe /DLL /nologo
ObjectSuffix :=.obj
DependSuffix :=
PreprocessSuffix :=
DebugSwitch :=/Zi
IncludeSwitch :=/I
LibrarySwitch :=
OutputSwitch :=/OUT:
LibraryPathSwitch :=/LIBPATH:
PreprocessorSwitch :=/D
SourceSwitch :=
CompilerName :=cl.exe /nologo /c
C_CompilerName :=cl.exe /nologo /c
OutputFile :=$(IntermediateDirectory)/$(ProjectName).exe
Preprocessors :=
ObjectSwitch :=/Fo
ArchiveOutputSwitch :=/OUT:
PreprocessOnlySwitch :=
ObjectsFileList :="C:\GB\PROGRAMS-VC\gzip4\gzip4.txt"
PCHCompileFlags :=
MakeDirCommand :=makedir
CmpOptions := /Zi $(Preprocessors)
C_CmpOptions := /Zi $(Preprocessors)
LinkOptions := /DEBUG
IncludePath := $(IncludeSwitch)""C:/Program Files/DevStudio/VC/include"" $(IncludeSwitch).
IncludePCH :=
RcIncludePath :=
Libs :=
LibPath :=$(LibraryPathSwitch)""C:/Program Files/DevStudio/VC/lib"" $(LibraryPathSwitch).


##
## User defined environment variables
##
CodeLiteDir:=C:\Program Files\Linux\CodeLite
UNIT_TEST_PP_SRC_DIR:=C:\Tools\LINUX\CODELITE IDE\RUN\UnitTest++-1.3
Objects=$(IntermediateDirectory)/zip$(ObjectSuffix) $(IntermediateDirectory)/bits$(ObjectSuffix) $(IntermediateDirectory)/deflate$(ObjectSuffix) $(IntermediateDirectory)/gzip$(ObjectSuffix) $(IntermediateDirectory)/inflate$(ObjectSuffix) $(IntermediateDirectory)/lzw$(ObjectSuffix) $(IntermediateDirectory)/trees$(ObjectSuffix) $(IntermediateDirectory)/unlzh$(ObjectSuffix) $(IntermediateDirectory)/unlzw$(ObjectSuffix) $(IntermediateDirectory)/unpack$(ObjectSuffix) \
$(IntermediateDirectory)/unzip$(ObjectSuffix) $(IntermediateDirectory)/util$(ObjectSuffix)

##
## Main Build Targets
##
.PHONY: all clean PreBuild PrePreBuild PostBuild
all: $(OutputFile)

$(OutputFile): $(IntermediateDirectory)/.d $(Objects)
@$(MakeDirCommand) $(@D)
@echo "" > $(IntermediateDirectory)/.d
@echo $(Objects) > $(ObjectsFileList)
$(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)

$(IntermediateDirectory)/.d:
@$(MakeDirCommand) "Debug"

PreBuild:


##
## Objects
##
$(IntermediateDirectory)/zip$(ObjectSuffix): zip.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/zip.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/zip$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/bits$(ObjectSuffix): bits.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/bits.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/bits$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/deflate$(ObjectSuffix): deflate.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/deflate.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/deflate$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/gzip$(ObjectSuffix): gzip.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/gzip.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/gzip$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/inflate$(ObjectSuffix): inflate.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/inflate.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/inflate$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/lzw$(ObjectSuffix): lzw.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/lzw.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/lzw$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/trees$(ObjectSuffix): trees.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/trees.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/trees$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/unlzh$(ObjectSuffix): unlzh.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/unlzh.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/unlzh$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/unlzw$(ObjectSuffix): unlzw.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/unlzw.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/unlzw$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/unpack$(ObjectSuffix): unpack.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/unpack.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/unpack$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/unzip$(ObjectSuffix): unzip.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/unzip.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/unzip$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/util$(ObjectSuffix): util.c
$(C_CompilerName) $(SourceSwitch) "C:/GB/PROGRAMS-VC/gzip4/util.c" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/util$(ObjectSuffix) $(IncludePath)
##
## Clean
##
clean:
$(RM) $(IntermediateDirectory)/zip$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/zip$(DependSuffix)
$(RM) $(IntermediateDirectory)/zip$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/bits$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/bits$(DependSuffix)
$(RM) $(IntermediateDirectory)/bits$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/deflate$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/deflate$(DependSuffix)
$(RM) $(IntermediateDirectory)/deflate$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/gzip$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/gzip$(DependSuffix)
$(RM) $(IntermediateDirectory)/gzip$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/inflate$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/inflate$(DependSuffix)
$(RM) $(IntermediateDirectory)/inflate$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/lzw$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/lzw$(DependSuffix)
$(RM) $(IntermediateDirectory)/lzw$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/trees$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/trees$(DependSuffix)
$(RM) $(IntermediateDirectory)/trees$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/unlzh$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/unlzh$(DependSuffix)
$(RM) $(IntermediateDirectory)/unlzh$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/unlzw$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/unlzw$(DependSuffix)
$(RM) $(IntermediateDirectory)/unlzw$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/unpack$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/unpack$(DependSuffix)
$(RM) $(IntermediateDirectory)/unpack$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/unzip$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/unzip$(DependSuffix)
$(RM) $(IntermediateDirectory)/unzip$(PreprocessSuffix)
$(RM) $(IntermediateDirectory)/util$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/util$(DependSuffix)
$(RM) $(IntermediateDirectory)/util$(PreprocessSuffix)
$(RM) $(OutputFile)
$(RM) $(OutputFile).exe
$(RM) "C:\GB\PROGRAMS-VC\gzip4\gzip4\.build-debug\gzip4"


=============================
PROJECT FILE gzip4.project
=============================
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Project Name="gzip4" InternalType="Console">
<Description/>
<Dependencies/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="">
<IncludePath Value="."/>
</Compiler>
<Linker Options="">
<LibraryPath Value="."/>
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="VC++" DebuggerType="GNU gdb debugger" Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="/Zi" C_Options="/Zi" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags=""/>
<Linker Options="/DEBUG" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).exe" IntermediateDirectory="Debug" Command="$(ProjectName).exe" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
</Debugger>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<RebuildCommand/>
<CleanCommand/>
<BuildCommand/>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName/>
<WorkingDirectory/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
<Completion>
<ClangCmpFlags/>
<ClangPP/>
<SearchPaths/>
</Completion>
</Configuration>
<Configuration Name="Release" CompilerType="VC++" DebuggerType="GNU gdb debugger" Type="" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="" C_Options="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags=""/>
<Linker Options="" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).exe" IntermediateDirectory="Release" Command="$(ProjectName).exe" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="<Use Defaults>" DbgSetName="<Use Defaults>">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
</Debugger>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<RebuildCommand/>
<CleanCommand/>
<BuildCommand/>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName/>
<WorkingDirectory/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
<Completion>
<ClangCmpFlags/>
<ClangPP/>
<SearchPaths/>
</Completion>
</Configuration>
</Settings>
<VirtualDirectory Name="src">
<File Name="zip.c"/>
<File Name="bits.c"/>
<File Name="deflate.c"/>
<File Name="gzip.c"/>
<File Name="inflate.c"/>
<File Name="lzw.c"/>
<File Name="trees.c"/>
<File Name="unlzh.c"/>
<File Name="unlzw.c"/>
<File Name="unpack.c"/>
<File Name="unzip.c"/>
<File Name="util.c"/>
</VirtualDirectory>
<VirtualDirectory Name="include">
<File Name="tailor.h"/>
<File Name="config.h"/>
<File Name="gzip.h"/>
<File Name="lzw.h"/>
<File Name="revision.h"/>
</VirtualDirectory>
</CodeLite_Project>
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by eranif »

I can't seem to reproduce this..

which version of codelite are you using?

Eran
Make sure you have read the HOW TO POST thread
GCB-Toronto
CodeLite Enthusiast
Posts: 16
Joined: Tue Dec 20, 2011 10:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by GCB-Toronto »

Version v3.0.5041
GCB-Toronto
CodeLite Enthusiast
Posts: 16
Joined: Tue Dec 20, 2011 10:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by GCB-Toronto »

Is this an issue that could be corrected by editing the makefile?
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by eranif »

GCB-Toronto wrote:Version v3.0.5041
codelite 3 is very old. Please upgrade. The current stable release is 5.1. codelite 5.1 is compatible with old versions of codelite (back to v1.0) so its really safe to upgrade
GCB-Toronto wrote:Is this an issue that could be corrected by editing the makefile?
No. Any change done to the makefile will be override by codelite

Eran
Make sure you have read the HOW TO POST thread
GCB-Toronto
CodeLite Enthusiast
Posts: 16
Joined: Tue Dec 20, 2011 10:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by GCB-Toronto »

Ok thanks that is better, but I am getting different errors as below.
Could there be a problem with the double-double quotes around "C:/Program Files/Microsoft Visual Studio 8/VC/include"?
Gerry

C:\WINDOWS\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f "gzip4.mk" Debug/deflate.obj"
----------Building project:[ gzip4 - Debug ] (Single File Build)----------
cl.exe /nologo /c "C:/GB/PROGRAMS-VC/gzip4/deflate.c" /Zi /FoDebug/deflate.obj /I""C:/Program Files/Microsoft Visual Studio 8/VC/include"" /I. /I.
Command line warning D4024 : unrecognized source file type 'Files/Microsoft', object file assumed
Command line warning D4027 : source file 'Files/Microsoft' ignored
Command line warning D4024 : unrecognized source file type 'Visual', object file assumed
Command line warning D4027 : source file 'Visual' ignored
Command line warning D4024 : unrecognized source file type 'Studio', object file assumed
Command line warning D4027 : source file 'Studio' ignored
Command line warning D4024 : unrecognized source file type '8/VC/include', object file assumed
Command line warning D4027 : source file '8/VC/include' ignored
deflate.c
C:/GB/PROGRAMS-VC/gzip4/gzip.h(310) : error C2280: missing '{' before identifier '_GL_ATTRIBUTE_PURE'?
mingw32-make.exe: *** [Debug/deflate.obj] Error 2
gzip4.mk:97: recipe for target `Debug/deflate.obj' failed
1 errors, 0 warnings
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by eranif »

Looks like it
Make sure you don't have any "" around the _global_ include path from:
Settings -> Build Settings -> Compilers -> VC++

As a side note, why are you using VC++? why not g++? You should know that codelite has not debugger capabilities for VC++ binaries only for gcc/g++ binaries

Eran
Make sure you have read the HOW TO POST thread
GCB-Toronto
CodeLite Enthusiast
Posts: 16
Joined: Tue Dec 20, 2011 10:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by GCB-Toronto »

I may go back to gcc, I am compiling gz port it into a Win32-based application.

I got rid of all double quotes in the _global_ include path and now it compiles properly.

Thanks eranif ! :)
GCB-Toronto
CodeLite Enthusiast
Posts: 16
Joined: Tue Dec 20, 2011 10:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by GCB-Toronto »

(one more question) :)

How to switch back to g++? Do I need to re-make the project or is there a simple way to switch compilers?

Thanks!
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: No rule to make target

Post by eranif »

project settings -> common settings -> general

and change the compiler type from 'VC++' to 'g++'

Eran
Make sure you have read the HOW TO POST thread
Post Reply