Thread: ctags problem

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    5

    Angry ctags problem

    Hello,

    I have a really huge source organised in a complicated dir. tree. I am using Vim editor and ctags to make a tagfile of that source code. Now, the problem is that ctags seems not to have processed every detail it should (i used ctags -R) since, although i can jump using ctrl-] to a class header (for example there is a line G4Step* blah= new G4Step(blah), it jumps to a /blah/blah/blah/.../blah/G4Step.hh, as it should), i can not jump to a method declaration within that class
    (example: ctrl-] for blah->GetMyDoughnutsQuickly() will not get me to a declaration of GetMyDoughnutsQuickly() saying that tag doesn' t exist, eventhough the tag G4Step does exist).

    Now this makes me mad as hell! Anybody knows how to help? Or should I start using cscope, global, ...?

  2. #2
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    try --extra=+q

    On a second note, have you tried kscope (kde C ide using cscope and ctags)? I've been using vi for quite some time and although I've not used kscope much (just started my first project with it) it's very nice. You might give it a try some time if you haven't.

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    5
    Thanks, valis, but --extra=+q didn' t work (by the way what is it actually for? i din not quite understand from the manual whether it serves to find a particural method in a particular class using class::method pattern or for something else?). But I figured something strange. The class header has several public: fields, and ctags finds only methods declared in the last public: field, skipping the previously declared methods as if they do not exist.

  4. #4
    Registered User
    Join Date
    Jun 2006
    Posts
    5
    Oh, I solved the poroblem. Actual method declarations were hidden in .icc files which were included by the header .hh file. Since, by ctags by default does not scan for .icc files it had to be included with --langmap option. I have also put .icc in -h option to treat it as a header.

    Now, I had this problem when using Geant4 in my code. (This is for google searches of the type: "Geant4 ctags" :-)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM