how to enable code auto-complete feature ?

General questions regarding the usage of CodeLite
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: how to enable code auto-complete feature ?

Post by varnie »

good day!

i guess, the entry above has been incorrect:
System Name="GNU makefile for g++/gcc" ToolPath="C:/MinGW/bin/mingw32-make.EXE"
i fixed that changing it to: ToolPath="/usr/local/bin/gmake"
and now it works well.
btw, here is the output of "which /usr/local/bin/gmake" on my FreeBSD 7.0 system: "/usr/local/bin/gmake". i think everything goes well here.
it seems strange for me that CodeLite version for FreeBSD has Windows-related path for "make" as above:) maybe it's worthy to pay efforts to fix this so FreeBSD users of CodeLite won't have this little defect i have had? thanks.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: how to enable code auto-complete feature ?

Post by eranif »

eranif wrote:it seems strange for me that CodeLite version for FreeBSD has Windows-related path for "make" as above:)
Indeed. The path there is because that when Pietro packaged the sources for FreeBSD, he also packed the build_settings.xml which I am using for debugging CodeLite on Windows...

I think I will place there 'make' and thats it.

Also, I added new 'check box' to the 'Build System' page which will prevent CodeLite from attempting to fix any paths. (I already committed it to SVN).

Btw, how is the overall user experience for CodeLite so far on FreeBSD? Can I state on the main site that it is working properly?

Eran
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: how to enable code auto-complete feature ?

Post by varnie »

eranif wrote: Btw, how is the overall user experience for CodeLite so far on FreeBSD? Can I state on the main site that it is working properly?
it works pretty well i must say! have no problems using CodeLite (CodeLite SVN Build, Revision: 1599) running on my PC with FreeBSD 7.0 Release. everything seems to be fine.
one more thing i would suggest you is to put your detailed tips about how to enable CC which you've described here on your official CodeLite website. it would make *nix users happy ;)
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: how to enable code auto-complete feature ?

Post by varnie »

good day!

i'm struggling with following problem now:
i want to compile my program using g++ and compiler's flags "-DNDEBUG -02 -Wall". how can i enable them in CodeLite? i've tried to set them in Project Settings-->Compiler-->Compiler Options, but have had no success. btw, when i compile my program right into console, using "g++ -o proggy proggy.cpp -I/usr/local/include -DNDEBUG -02 -Wall" everything goes fine.

thanks for clarification.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: how to enable code auto-complete feature ?

Post by eranif »

can u paste here the full build log ? (the one from the output pane, at the bottom).

Also, if you can paste here the content of the file:
<your_project_name>.project (this is an XML file for CodeLite project)

Eran
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: how to enable code auto-complete feature ?

Post by varnie »

here is a build log:
Building: "/usr/local/bin/gmake" -j 2 -f "int_wsp.mk" type=Release
----------Building project:[ interpreter - Release ]----------
g++ -c main.cpp -g -I /usr/local/include/ -O2 -DNDEBUG -o ./Release/main.o -I.
In file included from main.cpp:4:
CConsoleInput.h:34:28: warning: no newline at end of file
g++ -o ./Release/interpreter ./Release/main.o ./Release/CLexer.o
----------Build Ended----------
and here's .project file:
<CodeLite_Project Name="interpreter">
<Description/>

<VirtualDirectory Name="src">
<File Name="main.cpp"/>
<File Name="ConsoleInput.h"/>
<File Name="CFlow.h"/>
<File Name="CInput.h"/>
<File Name="CLexer.cpp"/>
<File Name="CLexer.h"/>
<File Name="CSyntaxer.h"/>
<File Name="CVariable.h"/>
<File Name="includes.h"/>
<File Name="CValue.h"/>
</VirtualDirectory>

<Settings Type="Executable">

<Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger">
<General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>

<Compiler Required="yes" Options="-g -I /usr/local/include/">
<IncludePath Value="."/>
</Compiler>
<Linker Required="yes" Options=""/>
<ResourceCompiler Required="no" Options=""/>
<PreBuild/>
<PostBuild/>

<CustomBuild Enabled="no">
<CleanCommand/>
<BuildCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory/>
</CustomBuild>

<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>

<Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger">
<General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>

<Compiler Required="yes" Options="-g -I /usr/local/include/ -O2 -DNDEBUG">
<IncludePath Value="."/>
</Compiler>
<Linker Required="yes" Options=""/>
<ResourceCompiler Required="no" Options=""/>
<PreBuild/>
<PostBuild/>

<CustomBuild Enabled="no">
<CleanCommand/>
<BuildCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory/>
</CustomBuild>

<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
</Settings>
<Dependencies/>
</CodeLite_Project>
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: how to enable code auto-complete feature ?

Post by eranif »

varnie wrote:----------Building project:[ interpreter - Release ]----------
g++ -c main.cpp -g -I /usr/local/include/ -O2 -DNDEBUG -o ./Release/main.o -I.
Maybe I am missing something here, but I DO see the -NDEBUG & -O2 in the build log, so what seems to be the problem?
varnie wrote:<Compiler Required="yes" Options="-g -I /usr/local/include/ -O2 -DNDEBUG">
Dont add include directories to the 'Options' field but rather to the 'Additional Search Path' field, like the following image:

Image

Eran
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: how to enable code auto-complete feature ?

Post by varnie »

eranif wrote: Maybe I am missing something here, but I DO see the -NDEBUG & -O2 in the build log, so what seems to be the problem?
the problem is that i don't "see" that these compiler's flags DO make a sense being used in CodeLite project's settings. here's what's wrong here:
when i compile my project from CodeLite IDE i get my program's size (ELF file) about "415792 Byte" (i.e. 0.4 MB), but when i compile it right in console, using g++ and the same compiler's flags as above, i get "57336 Byte". isn't that strange?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: how to enable code auto-complete feature ?

Post by eranif »

varnie wrote:when i compile my project from CodeLite IDE i get my program's size (ELF file) about "415792 Byte" (i.e. 0.4 MB), but when i compile it right in console, using g++ and the same compiler's flags as above, i get "57336 Byte". isn't that strange?
eranif wrote:g++ -c main.cpp -g -I /usr/local/include/ -O2 -DNDEBUG -o ./Release/main.o -I.
The reason is that you have a '-g' option set there...
remove it from the 'Options' field and you will get the same executable size.
Eran

PS:
Please open a new topic next time, since this thread topic "how to activate auto-completion feature" is not relevant anymore for the last 3 problems we worked on
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: how to enable code auto-complete feature ?

Post by varnie »

yes, everything is okey now. thanks!
eranif wrote: PS:
Please open a new topic next time, since this thread topic "how to activate auto-completion feature" is not relevant anymore for the last 3 problems we worked on
i see. no problem.
Post Reply