Cscope plugin doesn't work on Vista

Post here any ideas/problems/suggestions you have regarding CodeLite's CScope plugin
whytea
CodeLite Enthusiast
Posts: 18
Joined: Mon Apr 05, 2010 9:26 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Cscope plugin doesn't work on Vista

Post by whytea » Wed Apr 07, 2010 11:41 am

eranif wrote:
whytea wrote:Other than that, the "Goto Declaration", etc. are all OK.
You do know that the 'goto declaration' etc, does not come from cscope? codelite has its own indexer. cscope is just a minor plugin which provide the cscope functionality (you can see what it does from the 'plugins -> cscope') nothing more nothing less.

All other options (code-completion, go to decl/impl etc are coming from codelite_indexer)

Eran
Yes, I'm aware that the internal indexer is independent of Cscope. The inbuilt functions are nice and easy to use, but I'd still like to have the Cscope features on top of that. This is what I have done:

1) Uninstalled codelite on my Vista and re-installed it from scratch
- Cscope works fine from codelite

2) I repeated exactly the same steps in 1) on Win2K3
- But Cscope does NOT work from codelite
- I noticed that Cscope run fine in cmd and cscope_file.list
was successfully created

I'm wondering what could have stopped Cscope from working in Win2k3?

/Why Tea

User avatar
eranif
CodeLite Plugin
Posts: 5886
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Cscope plugin doesn't work on Vista

Post by eranif » Wed Apr 07, 2010 12:38 pm

You should and try to run it from the command line, like this:
First, open a shell from whithin codelite (right click on any open editor's tab and select 'Open Shell at File Path')
this will make sure that your shell inherits codelite's environment variables.

Next, cd to the cscope_file.list directory and run this command:

Code: Select all

cscope.exe -L -0 MyFunction  -i cscope_file.list
This will attempt to find C symbol MyFunction

Please paste here any error you are getting.


Another possible direction (if we are lucky...) see if you get any error in the 'Trace' window

Eran
Make sure you have read the HOW TO POST thread

whytea
CodeLite Enthusiast
Posts: 18
Joined: Mon Apr 05, 2010 9:26 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Cscope plugin doesn't work on Vista

Post by whytea » Wed Apr 07, 2010 1:41 pm

eranif wrote:You should and try to run it from the command line, like this:
First, open a shell from whithin codelite (right click on any open editor's tab and select 'Open Shell at File Path')
this will make sure that your shell inherits codelite's environment variables.

Next, cd to the cscope_file.list directory and run this command:

Code: Select all

cscope.exe -L -0 MyFunction  -i cscope_file.list
This will attempt to find C symbol MyFunction

Eran
I followed your instructions and it worked fine, i.e. built the db and found the function. However, I went back to codelite and the Cscope plugin didn't find anything.

BTW, does the Cscope plugin rebuild the db for each search? I think not as that would be too time consuming.

User avatar
eranif
CodeLite Plugin
Posts: 5886
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Cscope plugin doesn't work on Vista

Post by eranif » Wed Apr 07, 2010 3:18 pm

If the option 'update db' is enabled, the database will be created for each search (see pic-1)
cscope-tab.png
To create the database manually, use Ctrl-4 (see pic-2)
cscope-menu.png
Eran
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread

whytea
CodeLite Enthusiast
Posts: 18
Joined: Mon Apr 05, 2010 9:26 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Cscope plugin doesn't work on Vista

Post by whytea » Wed Apr 07, 2010 5:06 pm

Thanks for the screen-shots, I did try to manually (and auto) create the cscope db from within codelite, but it somehow failed. Does codelite keep any logs of external tool printouts for debugging?

/Why Tea

Post Reply