problem when CodeLite compiles wxHelloWorld

CodeLite installation/troubleshooting forum
yagnmeng
CodeLite Curious
Posts: 5
Joined: Sat Dec 28, 2013 11:22 am
Genuine User: Yes
IDE Question: c++
Contact:

problem when CodeLite compiles wxHelloWorld

Post by yagnmeng » Sun Dec 29, 2013 1:08 pm

when i compile my first wxprogamm,i meet the problem:

C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f "wxHelloWorld.mk" all"
----------Building project:[ wxHelloWorld - Debug ]----------
'mingw32-make.exe' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò
»òÅú´¦ÀíÎļþ¡£
0 errors, 0 warnings

Can anybody give a tip,thanks!

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

Re: problem when CodeLite compiles wxHelloWorld

Post by eranif » Sun Dec 29, 2013 1:13 pm

Well, its hard to tell without being able to read Chinese
Try changing gcc locale by doing the following:
From within codeite's main menu go to:

Settings -> Environment variables
and add the following line:

Code: Select all

LC_ALL=C
Recompile your code and paste it again here (it should be in English this time)

Eran
Make sure you have read the HOW TO POST thread

yagnmeng
CodeLite Curious
Posts: 5
Joined: Sat Dec 28, 2013 11:22 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: problem when CodeLite compiles wxHelloWorld

Post by yagnmeng » Sun Dec 29, 2013 1:22 pm

well,i have done as your guide,but the output is still the same:

C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f Makefile"
'mingw32-make.exe' ²»ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò
»òÅú´¦ÀíÎļþ¡£

0 errors, 0 warnings

i do not understand what does the unreadable code(ÊÇÄÚ²¿»òÍⲿÃüÁҲ²»ÊÇ¿ÉÔËÐеijÌÐò
»òÅú´¦ÀíÎļþ¡£) mean

eranif wrote:Well, its hard to tell without being able to read Chinese
Try changing gcc locale by doing the following:
From within codeite's main menu go to:

Settings -> Environment variables
and add the following line:

Code: Select all

LC_ALL=C
Recompile your code and paste it again here (it should be in English this time)

Eran

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

Re: problem when CodeLite compiles wxHelloWorld

Post by eranif » Sun Dec 29, 2013 1:31 pm

Try running the command from a CMD.EXE shell:

Code: Select all

C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f "wxHelloWorld.mk" all"
Eran
Make sure you have read the HOW TO POST thread

yagnmeng
CodeLite Curious
Posts: 5
Joined: Sat Dec 28, 2013 11:22 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: problem when CodeLite compiles wxHelloWorld

Post by yagnmeng » Sun Dec 29, 2013 1:36 pm

eranif wrote:Try running the command from a CMD.EXE shell:

Code: Select all

C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f "wxHelloWorld.mk" all"
Eran

I tried,the result as following:
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\yangmeng>D:

D:\>cd CodeLiteProj

D:\CodeLiteProj>cd wxHelloWorld

D:\CodeLiteProj\wxHelloWorld>C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j
4 -e -f "wxHelloWorld.mk" all"
wxHelloWorld.mk:67: *** empty variable name. Stop.

D:\CodeLiteProj\wxHelloWorld>



thanks

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

Re: problem when CodeLite compiles wxHelloWorld

Post by eranif » Sun Dec 29, 2013 1:39 pm

Seems like some issue with displaying locales in codelite's output pane

However, can you please attach the file wxHelloWorld.mk to this post?

Code: Select all

wxHelloWorld.mk:67: *** empty variable name. Stop.
Eran
Make sure you have read the HOW TO POST thread

yagnmeng
CodeLite Curious
Posts: 5
Joined: Sat Dec 28, 2013 11:22 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: problem when CodeLite compiles wxHelloWorld

Post by yagnmeng » Sun Dec 29, 2013 1:41 pm

eranif wrote:Seems like some issue with displaying locales in codelite's output pane

However, can you please attach the file wxHelloWorld.mk to this post?

Code: Select all

wxHelloWorld.mk:67: *** empty variable name. Stop.
Eran


OK,as following!

Code: Select all

##
## Auto Generated makefile by CodeLite IDE
## any manual changes will be erased      
##
## Debug
ProjectName            :=wxHelloWorld
ConfigurationName      :=Debug
WorkspacePath          := "D:\CodeLiteProj\wxHelloWorld"
ProjectPath            := "D:\CodeLiteProj\wxHelloWorld"
IntermediateDirectory  :=./Debug
OutDir                 := $(IntermediateDirectory)
CurrentFileName        :=
CurrentFilePath        :=
CurrentFileFullPath    :=
User                   :=yangmeng
Date                   :=12/29/2013
CodeLitePath           :="C:\Program Files\CodeLite"
LinkerName             :=g++
SharedObjectLinkerName :=g++ -shared -fPIC
ObjectSuffix           :=.o
DependSuffix           :=.o.d
PreprocessSuffix       :=.o.i
DebugSwitch            :=-gstab
IncludeSwitch          :=-I
LibrarySwitch          :=-l
OutputSwitch           :=-o 
LibraryPathSwitch      :=-L
PreprocessorSwitch     :=-D
SourceSwitch           :=-c 
OutputFile             :=$(IntermediateDirectory)/$(ProjectName)
Preprocessors          :=
ObjectSwitch           :=-o 
ArchiveOutputSwitch    := 
PreprocessOnlySwitch   :=-E 
ObjectsFileList        :="wxHelloWorld.txt"
PCHCompileFlags        :=
MakeDirCommand         :=makedir
RcCmpOptions           := $(shell wx-config --rcflags)
RcCompilerName         :=windres
LinkOptions            :=  $(shell wx-config --libs --debug) -mwindows
IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch). 
IncludePCH             := 
RcIncludePath          := 
Libs                   := 
ArLibs                 :=  
LibPath                := $(LibraryPathSwitch). 

##
## Common variables
## AR, CXX, CC, AS, CXXFLAGS and CFLAGS can be overriden using an environment variables
##
AR       := ar rcus
CXX      := g++
CC       := gcc
CXXFLAGS :=  -g -O0 -Wall $(shell wx-config --cflags --debug) $(Preprocessors)
CFLAGS   :=  -g -O0 -Wall $(Preprocessors)
ASFLAGS  := 
AS       := as


##
## User defined environment variables
##
CodeLiteDir:=C:\Program Files\CodeLite
UNIT_TEST_PP_SRC_DIR:=C:\UnitTest++-1.3
LC_ALL:=C
C:\Program Files\CodeLite\MinGW-4.7.1\bin:=
Objects0=$(IntermediateDirectory)/main$(ObjectSuffix) $(IntermediateDirectory)/wxcrafter$(ObjectSuffix) $(IntermediateDirectory)/wxcrafter_bitmaps$(ObjectSuffix) $(IntermediateDirectory)/MainDialog$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) 



Objects=$(Objects0) 

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

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

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

PreBuild:


##
## Objects
##
$(IntermediateDirectory)/main$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main$(DependSuffix)
	$(CXX) $(IncludePCH) $(SourceSwitch) "D:/CodeLiteProj/wxHelloWorld/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/main$(DependSuffix): main.cpp
	@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main$(ObjectSuffix) -MF$(IntermediateDirectory)/main$(DependSuffix) -MM "main.cpp"

$(IntermediateDirectory)/main$(PreprocessSuffix): main.cpp
	@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main$(PreprocessSuffix) "main.cpp"

$(IntermediateDirectory)/wxcrafter$(ObjectSuffix): wxcrafter.cpp $(IntermediateDirectory)/wxcrafter$(DependSuffix)
	$(CXX) $(IncludePCH) $(SourceSwitch) "D:/CodeLiteProj/wxHelloWorld/wxcrafter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxcrafter$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/wxcrafter$(DependSuffix): wxcrafter.cpp
	@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/wxcrafter$(ObjectSuffix) -MF$(IntermediateDirectory)/wxcrafter$(DependSuffix) -MM "wxcrafter.cpp"

$(IntermediateDirectory)/wxcrafter$(PreprocessSuffix): wxcrafter.cpp
	@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxcrafter$(PreprocessSuffix) "wxcrafter.cpp"

$(IntermediateDirectory)/wxcrafter_bitmaps$(ObjectSuffix): wxcrafter_bitmaps.cpp $(IntermediateDirectory)/wxcrafter_bitmaps$(DependSuffix)
	$(CXX) $(IncludePCH) $(SourceSwitch) "D:/CodeLiteProj/wxHelloWorld/wxcrafter_bitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxcrafter_bitmaps$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/wxcrafter_bitmaps$(DependSuffix): wxcrafter_bitmaps.cpp
	@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/wxcrafter_bitmaps$(ObjectSuffix) -MF$(IntermediateDirectory)/wxcrafter_bitmaps$(DependSuffix) -MM "wxcrafter_bitmaps.cpp"

$(IntermediateDirectory)/wxcrafter_bitmaps$(PreprocessSuffix): wxcrafter_bitmaps.cpp
	@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxcrafter_bitmaps$(PreprocessSuffix) "wxcrafter_bitmaps.cpp"

$(IntermediateDirectory)/MainDialog$(ObjectSuffix): MainDialog.cpp $(IntermediateDirectory)/MainDialog$(DependSuffix)
	$(CXX) $(IncludePCH) $(SourceSwitch) "D:/CodeLiteProj/wxHelloWorld/MainDialog.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainDialog$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/MainDialog$(DependSuffix): MainDialog.cpp
	@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MainDialog$(ObjectSuffix) -MF$(IntermediateDirectory)/MainDialog$(DependSuffix) -MM "MainDialog.cpp"

$(IntermediateDirectory)/MainDialog$(PreprocessSuffix): MainDialog.cpp
	@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MainDialog$(PreprocessSuffix) "MainDialog.cpp"

$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix): win_resources.rc
	$(RcCompilerName) -i "D:/CodeLiteProj/wxHelloWorld/win_resources.rc" $(RcCmpOptions)   $(ObjectSwitch)$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(RcIncludePath)

-include $(IntermediateDirectory)/*$(DependSuffix)
##
## Clean
##
clean:
	$(RM) $(IntermediateDirectory)/main$(ObjectSuffix)
	$(RM) $(IntermediateDirectory)/main$(DependSuffix)
	$(RM) $(IntermediateDirectory)/main$(PreprocessSuffix)
	$(RM) $(IntermediateDirectory)/wxcrafter$(ObjectSuffix)
	$(RM) $(IntermediateDirectory)/wxcrafter$(DependSuffix)
	$(RM) $(IntermediateDirectory)/wxcrafter$(PreprocessSuffix)
	$(RM) $(IntermediateDirectory)/wxcrafter_bitmaps$(ObjectSuffix)
	$(RM) $(IntermediateDirectory)/wxcrafter_bitmaps$(DependSuffix)
	$(RM) $(IntermediateDirectory)/wxcrafter_bitmaps$(PreprocessSuffix)
	$(RM) $(IntermediateDirectory)/MainDialog$(ObjectSuffix)
	$(RM) $(IntermediateDirectory)/MainDialog$(DependSuffix)
	$(RM) $(IntermediateDirectory)/MainDialog$(PreprocessSuffix)
	$(RM) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix)
	$(RM) $(OutputFile)
	$(RM) $(OutputFile).exe
	$(RM) ".build-debug/wxHelloWorld"

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

Re: problem when CodeLite compiles wxHelloWorld

Post by eranif » Sun Dec 29, 2013 2:05 pm

This line:

Code: Select all

C:\Program Files\CodeLite\MinGW-4.7.1\bin:=
Is causing the makefile to misbehave. It is coming from:
Settings -> Environment Variables

If you want to add a folder to the PATH environment variable, add it properly, like this:

Code: Select all

PATH=$PATH;C:\Program Files\CodeLite\MinGW-4.7.1\bin
Eran
Make sure you have read the HOW TO POST thread

yagnmeng
CodeLite Curious
Posts: 5
Joined: Sat Dec 28, 2013 11:22 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: problem when CodeLite compiles wxHelloWorld

Post by yagnmeng » Sun Dec 29, 2013 2:37 pm

eranif wrote:This line:

Code: Select all

C:\Program Files\CodeLite\MinGW-4.7.1\bin:=
Is causing the makefile to misbehave. It is coming from:
Settings -> Environment Variables

If you want to add a folder to the PATH environment variable, add it properly, like this:

Code: Select all

PATH=$PATH;C:\Program Files\CodeLite\MinGW-4.7.1\bin
Eran

Yes,i find the problem as you point out. at the same time i find wxwidgets' "include files" and library cannot put in the directory of "C:\Program Files",because the path include blank.
Now, my first wxwidgets program developed in CodeLite has run successfully,appreciate your help very much.

Good luck!

Post Reply