Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Other than using Emacs / Vim with ctags or cscope or both, are there alternatives to C++ code navigation of an existing code base? I used to use Source Insight on Windows and it worked for me fairly well. The main functionality I am looking for is quickly find definition of macros, variables and functions and places a function is referenced.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

In XCode, which comes with the OS, you have the "Jump to Definition" function, which I usually assign to Cmd-F1 (VC has some similar shortcut if I remember correctly). You will have to create an XCode project for your code base though. I don't know if there are any automatic converters, say, from Makefile to XCode project.

Most of the time Jump to Definition works fine, except when the name of your .cpp module differs from the .h header name; also doesn't work for overloaded operators. There are some intermittent failures that I can't explain, but overall, on simple and straightforward C++ code it can do the job OK.

P.S. there is no such thing like find references in XCode, but you have a project-wide Find function with an option to look for "Symbols", which I think is almost exact equivalent of finding references.

share|improve this answer
    
thanks. I also found this thread on stackoverflow, stackoverflow.com/questions/865415/… –  grokus Nov 28 '10 at 20:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.