Page 1 of 1

Can't Build and run project.

Posted: Tue Aug 05, 2008 6:53 pm
by Fla
I have CodeLite 1927 and MinGW4. System - Windows XP
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

Sorry for my bad english. I hope you understand me.
*Hello from Russia

Re: Can't Build and run project.

Posted: Tue Aug 05, 2008 8:34 pm
by eranif
Hi,

Can u try and build it again and post here the output of the build?

Eran

Re: Can't Build and run project.

Posted: Tue Aug 05, 2008 8:42 pm
by Fla
Build:
Building: "D:\MinGW4\bin\mingw32-make.exe" -j 2 -f "cpp_wsp.mk" type=Debug
----------Building project:[ test - Debug ]----------
g++ -c "D:/My Projects/cpp/test/main.cpp" -g -o ./Debug/main.o -I.
g++ -o ./Debug/test ./Debug/main.o
----------Build Ended----------
Outpput(after pressing run):
Current working directory: D:\My Projects\cpp\test\Debug
Running program: le_exec.exe ./test
Program exited with return code: -1073741510

Re: Can't Build and run project.

Posted: Tue Aug 05, 2008 8:47 pm
by eranif
can u list the content of the directory:
D:\My Projects\cpp\test\Debug

Eran

Re: Can't Build and run project.

Posted: Tue Aug 05, 2008 8:50 pm
by Fla
main.o
main.o.d
.exe

Re: Can't Build and run project.

Posted: Tue Aug 05, 2008 9:13 pm
by Fla
heh) i'm david blaine. it works. I reinstall mingw and codelite and all works.
thanks)

*very good IDE, thanks to developers

Re: Can't Build and run project.

Posted: Tue Aug 05, 2008 10:49 pm
by eranif
Fla wrote:*very good IDE
Thanks a lot
Fla wrote:, thanks to developers
that would be me ;)

Eran