tags:

views:

698

answers:

2

Hi,

I have downloaded cscope 15.6 on MacOSX.

But when i try launching it in MacOS Terminal or Tterm, the UP/DOWN key does not work. I can't move it from 1 query to another in the cscope interface.

Only CTRL-P CTRL-N works.

Can you please tell me how can I fix my problem?

Thank you.

+1  A: 

Very odd...I have cscope 15.6 installed in /usr/bin on MacOS X 10.5.7 - which means it must have come with Xcode (new machine; I don't put programs into /usr/bin except under extreme provocation).

Is there a reason not to use the Xcode version - since it works?


My cscope is in $ which cscope /opt/local/bin/cscope; I don't even remember how I got that cscope. Can you please tell me how to uninstall that /opt/local/bin/cscope and use the one with XCode?

Well, there are a variety of possibilities. The first step is to check whether you have /usr/bin/cscope. Assuming yes, the next step is to look at your PATH variable, and to ensure that /usr/bin appears before /opt/local/bin. Alternatively, you can simply remove the execute permissions on /opt/local/bin/cscope, or you can rename it, or remove it. (Note that removing execute permissions from programs can sometimes confuse configuration scripts - I had a /usr/gnu/bin/rm (or some similar utility) that was non-executable on my PATH ahead of /usr/bin/rm and that caused some issues until I removed it. The shells and things weren't confused; configure scripts were.

On a related question, can you please tell me how can I configure my existing XCode project to work with Cscope? How can I build CScope database in XCode? and how can I do Cscope query in XCode?

There, I'm afraid, you're ahead of me on the learning curve...I've not yet done enough with Xcode to know the answers to those questions. I have it installed; I've not done much, if anything, with it. I've still got some other configuration stuff to deal with first (tedious stuff like work-mandated email client).


I've downloaded both 15.6 and 15.7a, and when I try to build them on Leopard (10.5.8), the configure script appears to work but the build generates the error:

if gcc -DHAVE_CONFIG_H -I. -I. -I..     -g -O2 -MT build.o -MD -MP -MF ".deps/build.Tpo" -c -o build.o build.c; \
    then mv -f ".deps/build.Tpo" ".deps/build.Po"; else rm -f ".deps/build.Tpo"; exit 1; fi
In file included from build.c:50:
/usr/include/ncurses.h:550:40: error: macro "cbreak" passed 1 arguments, but takes just 0
/usr/include/ncurses.h:575:44: error: macro "erasechar" passed 1 arguments, but takes just 0
/usr/include/ncurses.h:611:43: error: macro "killchar" passed 1 arguments, but takes just 0
make[2]: *** [build.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

This bug is also reported to the cscope project at SourceForge by someone else, with the o/s claimed as Snow Leopard (so it is actually a problem in at least two versions - later versions of Leopard and Snow Leopard).

Jonathan Leffler
my cscope is in $ which cscope/opt/local/bin/cscopei don't even remember how i get that cscope.Can you please tell me how to uninstall that /opt/local/bin/cscope and use the one with XCode?Thank you
n179911
On a related question, can you please tell me how can I configure my existing XCode project to work with Cscope? How can I build CScope database in XCode? and how can I do Cscope query in XCode?Thank you.
n179911
/opt/local/bin is managed by MacPorts ordinarily, so simply "port uninstall cscope".
Nicholas Riley
abigagli
That work around fixed the issue for me :)
Pierre-Antoine LaFayette
A: 

I had the same problem. If you type '?', you will get a help menu that shows that hitting ^N and ^P will move the cursor up/down.

trancer