Page 1 of 2

Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 2:45 pm
by Exagon
Hi everyone I am new to codelite and i am facing some problems with some things :\
i think i am just to stupid to find the setings for it :D
1. If i have some Compiling Errors how can i make codelite highlighting the lines red in my code where the error was? is this possible? i hope so :\
2. my Code completion doesnt work on included header files. for example for std:: nothing apears :\ it only works on thinks like return, int and so on.
could you help me please?
greez Exagon :D
ps. sorry for my bad english :\

Re: Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 3:11 pm
by eranif
Please visit the link in my signature ("HOW TO POST") and provide all the information needed

Eran

Re: Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 3:36 pm
by Exagon
My Codelite Version 7.0
I instaled Codelite via yaourt from thr AUR
My OS is Arch Linux
My Compiler is gcc (GCC) 4.9.2 20150204 (prerelease)

My include paths are:
/usr/include/c++/4.9.2/x86_64-unknown-linux-gnu
/usr/include/c++
/usr/include

I dont have any Excluded paths

I did a Retag (didnt help)
I have a Workspace

an example would be

Code: Select all

#include <iostream>

int main() {
    std::cout << "Hello World" << std::endl;
    return 0;
}
there is no code completion for std::

Re: Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 3:44 pm
by eranif
On my Linux, the file "iostream" is located under:

Code: Select all

/usr/include/c++/4.8.2/iostream
Can you locate your file ?

Eran

Re: Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 5:22 pm
by Exagon
yes i added it to the search path now and it works for some functions and so on but for example for std::cout it doesnt work.
but thats ok thank you for helping me.
but have you any idea for my other problem?

Re: Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 6:01 pm
by eranif
codelite should detect this automatically for you and colour errors in red (and make them clickable)
If it does not, make sure that the proper compiler is selected in the project settings:
Open project settings->common settings->general->compiler

Eran

Re: Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 6:06 pm
by Exagon
its selected but it only shows me the errors in the build terminal not in the code and its not clickable :oops:

Exagon

Re: Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 6:11 pm
by eranif
Can you show the build log? + screenshot of your project settings?

Eran

Re: Code Completion on std and errors in code

Posted: Mon Feb 16, 2015 8:54 pm
by Exagon
I deleted an ; to cause an error
here is the buildlog

Code: Select all

/bin/sh -c '/usr/bin/make -j8 -e -f  Makefile'
----------Building project:[ ForEachVektor - Debug ]----------
make[1]: Verzeichnis „/home/lukas/.codelite/C++/ForEachVektor“ wird betreten
/usr/bin/g++ --std=c++11  -c  "/home/lukas/.codelite/C++/ForEachVektor/main.cpp" -g -O0 -Wall  -o ./Debug/main.cpp.o -I. -I.
/home/lukas/.codelite/C++/ForEachVektor/main.cpp: In Funktion »int main()«:
/home/lukas/.codelite/C++/ForEachVektor/main.cpp:10:2: Fehler: expected »;« before »}« token
  }
  ^
ForEachVektor.mk:91: die Regel für Ziel „Debug/main.cpp.o“ scheiterte
make[1]: *** [Debug/main.cpp.o] Fehler 1
make[1]: Verzeichnis „/home/lukas/.codelite/C++/ForEachVektor“ wird verlassen
Makefile:4: die Regel für Ziel „All“ scheiterte
make: *** [All] Fehler 2
1 errors, 0 warnings
which project settings do you need?
Codelite doesnt show ANY errors in the code ... never just the compiler recognices them as you can see but in the code there is no hint or something.
The project settings are default but if anyone can say which part of the setting you want to know i will show you :)
please help :cry:

Re: Code Completion on std and errors in code

Posted: Tue Feb 17, 2015 5:11 pm
by eranif
the reason the errors are not clickable are because your compiler output the error messages in German (?)
Try adding this line to the environment variables (from the main menu bar):
Settings->environment variables

Code: Select all

LC_ALL=C
This should instruct the compiler to produce english error messages.

Eran