When compiling, information about TEXT.txt pops up, about not being able to find some file or directory and input file (as I understand, a compiled file does not and cannot start accordingly):

Here such information pops up

The question is: what is the Test.txt file, what files can not find the CodeLite at startup and how to fix it?

makefile:

 .PHONY: clean All All: @echo "----------Building project:[ Test - Debug ]----------" @cd "Test" && "$(MAKE)" -f "Test.mk" clean: @echo "----------Cleaning project:[ Test - Debug ]----------" @cd "Test" && "$(MAKE)" -f "Test.mk" clean 

test.mk:

 ## ## Auto Generated makefile by CodeLite IDE ## any manual changes will be erased ## ## Debug ProjectName :=Test ConfigurationName :=Debug WorkspacePath :=C:/Users/Егорий/Documents/Krak ProjectPath :=C:/Users/Егорий/Documents/Krak/Test IntermediateDirectory :=./Debug OutDir := $(IntermediateDirectory) CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=Хускар Date :=20/09/2016 CodeLitePath :="E:/Program Files/CodeLite" LinkerName :=gcc SharedObjectLinkerName :=gcc -shared -fPIC ObjectSuffix :=.o DependSuffix :=.od PreprocessSuffix :=.oi DebugSwitch :=-g IncludeSwitch :=-I LibrarySwitch :=-l OutputSwitch :=-o LibraryPathSwitch :=-L PreprocessorSwitch :=-D SourceSwitch :=-c OutputFile :=$(IntermediateDirectory)/$(ProjectName) Preprocessors := ObjectSwitch :=-o ArchiveOutputSwitch := PreprocessOnlySwitch :=-E ObjectsFileList :="Test.txt" PCHCompileFlags := MakeDirCommand :=makedir RcCmpOptions := RcCompilerName :=windres LinkOptions := 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 := gcc CC := gcc CXXFLAGS := -g -O0 -Wall $(Preprocessors) CFLAGS := -g -O0 -Wall $(Preprocessors) ASFLAGS := AS := as ## ## User defined environment variables ## CodeLiteDir:=E:\Program Files\CodeLite Objects0=$(IntermediateDirectory)/main.c$(ObjectSuffix) Objects=$(Objects0) ## ## Main Build Targets ## .PHONY: all clean PreBuild PrePreBuild PostBuild MakeIntermediateDirs all: $(OutputFile) $(OutputFile): $(IntermediateDirectory)/.d $(Objects) @$(MakeDirCommand) $(@D) @echo "" > $(IntermediateDirectory)/.d @echo $(Objects0) > $(ObjectsFileList) $(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions) MakeIntermediateDirs: @$(MakeDirCommand) "./Debug" $(IntermediateDirectory)/.d: @$(MakeDirCommand) "./Debug" PreBuild: ## ## Objects ## $(IntermediateDirectory)/main.c$(ObjectSuffix): main.c $(IntermediateDirectory)/main.c$(DependSuffix) $(CC) $(SourceSwitch) "C:/Users/Егорий/Documents/Krak/Test/main.c" $(CFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.c$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/main.c$(DependSuffix): main.c @$(CC) $(CFLAGS) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main.c$(ObjectSuffix) -MF$(IntermediateDirectory)/main.c$(DependSuffix) -MM main.c $(IntermediateDirectory)/main.c$(PreprocessSuffix): main.c $(CC) $(CFLAGS) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main.c$(PreprocessSuffix)main.c -include $(IntermediateDirectory)/*$(DependSuffix) ## ## Clean ## clean: $(RM) -r ./Debug/ 
  • Did you save the code with the program in the TEST.txt file? - KoVadim
  • I put the code in main.c. in the command line through -o I chose the name of the compiled file? but here I don’t understand what TEST.txt is - Georgy
  • Give the contents of your Makefile. - aleks.andr
  • @ aleks.andr added a makefile to the question. - George
  • one
    @ George show the contents of Test.mk - zed

1 answer 1

The most likely cause of the error is that you use Russian letters in the paths to the project and workspace ( C:/Users/Егорий/Documents/Krak ). Try recreating your Workspace in a folder containing only English characters (for example, in D:\workspace ) should help.

As for the Test.txt file, this is a parameter file in which the list of compiled object files is transferred to the linker. This is done because of the restrictions on the length of the command line parameters in various operating systems (in Windows it is from 2047 to 8191 characters , depending on the version) and if the command line of the linker is too long, then it will not be able to do anything. For projects like Hello World , this, of course, is not relevant, but in a large project, with a large number of object files, it is quite possible to encounter these limits.

The parameter file (it gets the name ИмяПроекта.txt and is saved in the project folder) is automatically generated and usually there are no problems with it, but if the advice suddenly comes up above, renaming the folder does not help, then you can disable its generation through the CodeLite settings:

Settings -> Build Settings -> Compilers -> <Имя компилятора> -> Advanced

item "Pass object list to the linker via file"

After that, the linker will be passed the path to the object files directly through the command line.

By the way, Visual Studio also uses files to transfer parameters to the compiler and linker, so, in general, this is a common practice.

  • Thank you, it really helped get rid of bugs. I wanted to ask one more thing, and for the IDE to output the result directly at home it is possible to do it! .exe) and it manually through cmd displays the result. and in this case it is not possible to debug the program. Thanks. - George
  • @George Build -> Build and Run Project or hot key Ctrl + F9 . If the problem is more complicated, ask a new question. - zed