Solution to cs1_q option error in Windows from: http://easwy.com/blog/archives/cscope_sort_option_on_windows/
In the past, some netizens posted messages. When using cssag in windows, the following message is displayed using the-Q option:
D:\Temp> cscope -RbkqInput file specified two times.cscope: cannot create inverted index; ignoring -q optioncscope: removed files ncscope.in.out and ncscope.po.out
At that time, easwy thought that cssag of Windows does not support the-Q option.
However, Liang Feng left a message yesterday saying:
In Windows, cssag supports the-Q option. The above error occurs because the appropriate sort command is not found. Therefore, you only need the GNU version of sort in the working directory of the cssag process. Note that the working directory of the process is not the directory of the executable program. Take a look at the cssag code snippet for specific reasons. Build. C # ifdef win32snprintf (sortcommand, sizeof (sortcommand), "Set lc_all = C & sort-T % S % s", tmpdir, temp1); # elsesnprintf (sortcommand, sizeof (sortcommand), "env lc_all = C sort-T % S % s", tmpdir, temp1); # endif
So I tried again. After cygwin is installed, csflood is used on the shell interface of cygwin. The error message above is not displayed. If you open windows command line cmd.exe and execute cs.pdf in it, the above error will occur.
After a thorough comparison of cygwinand Microsoft Excel, I found that it was originally a ghost of Windows sort.exe.
In the shellwindow of cygwin, the setting of pathcontext changes will first find the gnuversion sort.exe, so the above cssag command can be successfully executed. However, in the "cmd.exe" window, pathcontext changes will first find sort.exe instead of GNU sort.exe, so the above error message will appear.
. The example program is as follows:
D:\Temp> type cs.bat@echo offset path=c:\cygwin\bin;cscope -Rbkq
In this batch, first point the path environment variableC: \ cygwin \ bin;, Both my cscope.exeand gnuversion sort.exe are in this directory. Now, the cscopecommand is executed. Now, the upgraded gnuversion sort.exe is used.