Shankar Chakkere's Cscope Page

home/ Cscope



1. Cscope

I have ported the Cscope (Ver 15b12) the developer's tool for browsing C program to Win9x. I have tested it on Win95 and Win98, my friend has been using it on his NT. The Cscope was ported using the DJGPP. Here is the Cscope(file: binary package in DJGPP format.

[images/caution.gif] NOTE: The source and the header files should not be set READ ONLY. "attrib -r *.c" will remove the read only attribute. Some of the user have complained that it 's not usable on Win2K, network drives etc. I don 't have the access to those environment to debug.

[images/caution.gif] NEW: I have also ported the GLOBAL source code tag sytem to windoze [images/caution.gif]

2. Batch files to build Index file

There are two batch files makecscope.bat and makedirlist.bat in djgpp/bin directory. You can use this to create the namefile needed with cscope -i namefile command. The batch files are self documented. _________________________________________________________________

3. Environment Variables to set

Here is the of clip of my batch file which I execute before Cscope. I have include only the environment variable which are relevant to Cscope.

@set TMPDIR=c:\tmp
@rem 8/24/2000 for cscope
@set INCLUDEDIRS=/djgpp/include
@set EDITOR=gvim
@rem cscope will not use editor if viewer is set
@rem set VIEWER=less
@set VIEWER=


4. Frequently Asked Questions

1. Cscope gives the following error
cscope: Temporary directory /tmp does not exist or cannot be accessed
cscope: Please create the directory or set the environment variable

You have to set the environment variable TMPDIR=c:\tmp make sure \tmp exists.

2. How to jump to the line number using Cscope
You have to set the environment variable EDITOR=gvim, you can use any of your favorite editor and make sure it accepts linenumber as input parameter. My favorite editor is VI which you can download from VIM Homepage. I use gvim instead of vim because under DOS you have to quit vim to return to Cscope. This is because DOS cannot run multiple process. The gvim is an windows editor and runs as a separate process in windows when launched from Cscope.

NOTE: Cscope will not use the environment variable EDITOR if the environment variable VIEWER is set. Unset the environment variable by @set VIEWER= in your batch file

3. Where to get the VIM binaries for Win9x/NT and which files to load?
You can load the binaries from The files you need to download are:	16 bit DOS version	32 bit DOS version	Windows 95/98/NT console version	Windows 95/98/NT GUI version	Windows 95/98/NT GUI version with OLE	Windows 3.1 GUI version     You MUST get this runtime archive 
Where XX is the version number of VIM

I unzip the files using pkunzip -d command, which restore Directory structure stored in .zip file
After installing
Read the "README.txt" for general information about Vim.
Read the "README_dos.txt" for general information about Vim on DOS and Windoze.
These files are located in vim/vimXX directory. Read them because they have extra information about setting the environment variables.

4. The Cscope "Change this text string" command is not working
Cscope needs ed command line editor in your path. You can load the ed for Windoze in simtelnet software repository.

5. Source Files

Here is the Cscope(file: source package in DJGPP format. The cscope was built using DJGPP(DJs GNU Programming Platform)for windows. I used pdcurses instead of curses. It ' s very easy to debug using gdb. Please mail me the patches.

images/wc.gif Indicate you are visitor number [Visitor Counter] , since 1 February 1999.

© Shankar Chakkere 2001.
Last update: Wed Feb 13 13:53:09 EST 2002 . Mail me if you have any suggestions.

Back to Shankar's Home Page 1