Hi eric,
Thanks for your help. I use the header file to include the symbol But I
still can't see it in semantic-lex-spp-describe(function name you gave is
wrong^_^) output.
I find it could work like this:
(semantic-c-add-preprocessor-symbol "__USE_POSIX" "1")
add this to .emacs then exit the emacs ,delete the db file. Restart , Ok.
Thanks for your help again~
On Tue, Jun 9, 2009 at 11:40 PM, <eric@...> wrote:
> Hi,
>
> Preprocessor symbols from the flie are not placed into the the symbol map
> variable you listed. Instead those two variables are combined.
>
> You can use semantic-spp-lex-describe to list all the preprocessor symbols.
>
> Also, be sure to exit emacs, then delete ~/.semanticdb, then restart Emacs
> when doing a test.
>
> Eric
>
> firenet <kevinmiter@...> seems to think that:
>
>
> My semantic-lex-c-preprocessor-symbol-file is
>> "/usr/include/c++/i486-linux-gnu/bits/c++config.h" . In that file no
>> define
>> for __USE_POSIX so I add #define __USE_POSIX to the end
>> of this file. After deleting the .semanticdb dir, I found
>> semantic-lex-c-preprocessor-symbol-map don't have __USE_POSIX like before.
>> Where am I wrong? Thank you.ls
>> On Tue, Jun 9, 2009 at 7:33 PM, Eric M. Ludlam <eric@...
>> >wrote:
>>
>> I looked in my signal.h on my ubuntu system, and the kill fcn is wrapped
>>> like this:
>>>
>>> #ifdef __USE_POSIX
>>> extern int kill (__pid_t __pid, int __sig) __THROW;
>>> #endif /* Use POSIX. */
>>>
>>> If I then do:
>>>
>>> M-x semantic-spp-lex-describe
>>>
>>> it does not list _USE_POSIX as an active macro.
>>>
>>> You can use semantic-lex-c-preprocessor-symbol-map or
>>> semantic-lex-c-preprocessor-symbol-file to add such #defines. You would
>>> then need to delete files from ~/.semanticdb that map to the system
>>> includes with the problems. That ought to fix this issue.
>>>
>>> Eric
>>>
>>> On Fri, 2009-06-05 at 02:28 +0800, firenet wrote:
>>> > Hi,
>>> > I have one problem like this:
>>> >
>>> > #include <stdio.h>
>>> > #include <signal.h>
>>> > int main(int argc, char *argv[])
>>> > {
>>> > kil
>>> > }
>>> >
>>> > here is my source code not completed, i want to use
>>> > semantic-ia-complete-symbol-menu, I just get one completion, it's
>>> > killpg.
>>> > But i think kill should be one choice here.
>>> > Actually, I want to use many functions like sig**** in signal.h but
>>> > semantic's completion can't give them to me.
>>> >
>>> > Semantic version is 2.0pre7 Gnu Emacs 23 Debian Linux.
>>> >
>>> > Thanks.
>>>
>>
>
>
>
--
No Gnus is bad news~
http://www.leezii.com/blog/
|