I have just discovered codelite. I switched from windows to Ubuntu a few years ago and the only thing I ever missed about windows was Codewright which I could never get to run properly under wine. Imagine my excitement when I discovered codelite offering all Codewright feature plus many more. I was particularly excited to find the menu option "add include file for" and equally disappointed when I tried it and nothing happened.
I have just done HelloWorld and was exploring the features so presumably there's something I need to configure before this will work. All the same some sort of error message would have been nice!
Any help gratefully received.
Regards
Mark
add include file for ...
-
- CodeLite Curious
- Posts: 1
- Joined: Fri May 20, 2011 3:40 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: add include file for ...
Hi Mark,
It works for me . Try doing a full retag of your app (Workspace > Retag Workspace (full)).
Regards,
David
It works for me . Try doing a full retag of your app (Workspace > Retag Workspace (full)).
Regards,
David
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: add include file for ...
This feature will work only if codelite already parsed the file containing the declaration.DavidGH wrote: I was particularly excited to find the menu option "add include file for" and equally disappointed when I tried it and nothing happened.
i.e, you need to have this file included somewhere in your code at least once. Once codelite encounters this file, it will be able to suggest it as include file.
When codelite starts a new workspace, it has no knowledge of any symbol. It will start parsing and saving symbols, include files etc once the user will add #include <..> to its code.
So lets say you wrote this code:
Code: Select all
int main() {
fprintf(stderr, "hello\n");
return 0;
}
so your code now become:
Code: Select all
#include <stdio.h>
int main() {
fprintf(stderr, "hello\n");
return 0;
}
Code: Select all
printf("another line\n");
HTH,
Eran
Eran
Make sure you have read the HOW TO POST thread