Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cscope unable to create inverted index. Why?

Tags:

vim

cscope

The following command works fine:

   $>cscope -b -R

However, the option for inverted index does not work:

$>cscope -b -q -k -R
Input file specified two times.

cscope: cannot create inverted index; ignoring -q option
cscope: removed files ncscope.in.out and ncscope.po.out

I googled this one and found some hits. But could not find any answers or solutions. Any insights are greatly appreciated.

like image 639
venk Avatar asked Oct 28 '10 12:10

venk


1 Answers

I got it now!!!

As usual, should have read the manual properly :-) I am using a win32 port of cscope from Google. (hosted at: http://code.google.com/p/cscope-win32/). Here is an excerpt from the 'wiki' tab (http://code.google.com/p/cscope-win32/wiki/UsageNotes?tm=6)

•To use inverted indices (-q option) you need sort utility. I am including one with the cscope archive (here is its source code). The utility can also be found on UnxUtils and http://gnuwin32.sf.net. It should be in your PATH before Windows dir because Windows has its own, incompatible sort utility.

NOTE: I actually needed to put the sort utility even before the c:\windows\system32. (It was not good enough to include it before c:\windows in the PATH).

Having done that, I am happy to say that I was able to create the inverted index.

like image 146
venk Avatar answered Oct 22 '22 18:10

venk