Code Completion on std and errors in code

CodeLite installation/troubleshooting forum
Exagon
CodeLite Curious
Posts: 6
Joined: Mon Feb 16, 2015 2:38 pm
Genuine User: Yes
IDE Question: C++
Contact:

Code Completion on std and errors in code

Post 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 :\
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post by eranif »

Please visit the link in my signature ("HOW TO POST") and provide all the information needed

Eran
Make sure you have read the HOW TO POST thread
Exagon
CodeLite Curious
Posts: 6
Joined: Mon Feb 16, 2015 2:38 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post 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::
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post 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
Make sure you have read the HOW TO POST thread
Exagon
CodeLite Curious
Posts: 6
Joined: Mon Feb 16, 2015 2:38 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post 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?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post 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
Make sure you have read the HOW TO POST thread
Exagon
CodeLite Curious
Posts: 6
Joined: Mon Feb 16, 2015 2:38 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post by eranif »

Can you show the build log? + screenshot of your project settings?

Eran
Make sure you have read the HOW TO POST thread
Exagon
CodeLite Curious
Posts: 6
Joined: Mon Feb 16, 2015 2:38 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post 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:
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code Completion on std and errors in code

Post 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
Make sure you have read the HOW TO POST thread
Post Reply