I create basic executable g++ project. Build it. And try to run, but i can see only black console and "Press any key to continue". I think it is because there is no file "test" in Debug folder.
If I execute Debug/.exe all is ok.
And how i can in IDE that Debug/.exe called Debug/PROJECTNAME.exe?
My makefile:
Code: Select all
##
## Auto Generated makefile, please do not edit
##
PATH:=$(PATH);D:\MinGW4\bin\
ProjectName:=test
## Debug
ifeq ($(type),Debug)
ConfigurationName :=Debug
IntermediateDirectory :=./Debug
OutDir := $(IntermediateDirectory)
LinkerName:=g++
ArchiveTool :=ar rcu
SharedObjectLinkerName :=g++ -shared -fPIC
ObjectSuffix :=.o
DebugSwitch :=-gstab
IncludeSwitch :=-I
LibrarySwitch :=-l
OutputSwitch :=-o
LibraryPathSwitch :=-L
PreprocessorSwitch :=-D
SourceSwitch :=-c
CompilerName :=g++
OutputFile :=$(IntermediateDirectory)/$(ProjectName)
Preprocessors :=
ObjectSwitch :=-o
ArchiveOutputSwitch :=
CmpOptions :=-g $(Preprocessors)
LinkOptions :=
IncludePath := $(IncludeSwitch).
RcIncludePath :=
Libs :=
LibPath :=
endif
Objects=$(IntermediateDirectory)/main$(ObjectSuffix)
##
## Main Build Tragets
##
all: $(OutputFile)
$(OutputFile): makeDirStep PrePreBuild $(Objects)
@makedir $(@D)
$(LinkerName) $(OutputSwitch)$(OutputFile) $(Objects) $(LibPath) $(Libs) $(LinkOptions)
makeDirStep:
@makedir "./Debug"
PrePreBuild:
PreBuild:
##
## Objects
##
$(IntermediateDirectory)/main$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main$(ObjectSuffix).d
$(CompilerName) $(SourceSwitch) "D:/My Projects/cpp/test/main.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/main$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/main$(ObjectSuffix).d:
@$(CompilerName) $(CmpOptions) $(IncludePath) -MT$(IntermediateDirectory)/main$(ObjectSuffix) -MF$(IntermediateDirectory)/main$(ObjectSuffix).d -MM main.cpp
##
## Clean
##
clean:
$(RM) $(IntermediateDirectory)/main$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/main$(ObjectSuffix).d
$(RM) $(OutputFile)
$(RM) $(OutputFile).exe
-include $(IntermediateDirectory)/*.d
*Hello from Russia