help-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Function declaration without definition are skipped


From: Arnaud Diederen
Subject: Function declaration without definition are skipped
Date: Tue, 27 Sep 2011 11:21:13 +0200


Hello all,

I'm considering using emacs + global for C++ development (under linux), and I've run into what's probably a pretty annoying issue for me.

I am working on a C++ project that uses an SDK, of which I only have the header (.h) files.
Those header files contain many function declarations, and a few inline function definitions.

It appears that only the definitions are indexed by global.
I presume this is normal (expected) behaviour, as I tried googling for it, as well as searching in the mailing lists (help & bug), but couldn't really find an answer to my problems.

Let's say I have the following 2 files:

--- test.h ---
int test();
int test2();
--------------

--- test.c ---

#include "test.h"

int test2()
{
  return 0;
}

int main()
{
  return 0;
}
--------------

Then, from my shell:
--------------
address@hidden:/tmp/global-test$ gtags
address@hidden:/tmp/global-test$ global test
address@hidden:/tmp/global-test$ global test2
test.c
address@hidden:/tmp/global-test$ global -f test.c
test2               4 test.c         int test2()
main                9 test.c         int main()
address@hidden:/tmp/global-test$
--------------

So, I was wondering whether there was a way to tell global to keep track of functions declarations, even though their corresponding definition is not found?
..this would obviously be helpful for me, for API browsing purposes.

Best regards,
        Arnaud Diederen

--
Do not ask how.
Ask rather why.
Once you know your reason, your method will be obvious.
        -- The book of Bears (zen scheme, ch 1 verse 22)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]