Re: Semantic C preprocessor and Qt

Eric Ludlam <[email protected]> Thu, 29 Jan 2015 21:47:32 -0500
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
On 01/26/2015 05:46 PM, David Engster wrote:
> Michael Kuryshev writes:
>> First of all sorry for double-posting, I thought my first message was
>> bounced. I tried defining new class with Q_GUI_EXPORT macro in the
>> project's source file, and it works as expected. I'm not completely
>> sure but it looks like parser ignore :spp-files setting when parsing
>> system headers.
>
> That is correct. Those system headers are not part of your project.
>
>> I tried adding files with macro definitions at .emacs to
>> semantic-lex-c-preprocessor-symbol-file list but no success here too.
>
> If you're adventurous, you can try a new branch upstream called
> deng/gcc-preprocessor. Build it as usual and use
>
> (semantic-add-system-include "/usr/include/qt4" 'c++-mode)
> (setq semantic-gcc-get-preprocessor-macros t)
>
> in your init file.
>
> This will use gcc to get all preprocessor macros for each file. That
> will slow down parsing of many files considerably, but it will have all
> macro information.

Ack, I apparently replied to this when it was already answered.  Sorry.

I like David's solution better.  ;)

Eric

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/