From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vyacheslav Gonakhchyan Newsgroups: gmane.emacs.devel Subject: Re: Emacs 24 semantic C++ completion problem Date: Fri, 30 Dec 2011 19:52:06 +0000 Message-ID: References: <4EFCE3A1.7030302@siege-engine.com> <87hb0i9zxt.fsf@engster.org> <878vlu9ss2.fsf@engster.org> <87r4zm80kf.fsf@engster.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d041702a74b3ba704b5549152 X-Trace: dough.gmane.org 1325274738 30461 80.91.229.12 (30 Dec 2011 19:52:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2011 19:52:18 +0000 (UTC) To: "Eric M. Ludlam" , emacs-devel@gnu.org, Vyacheslav Gonakhchyan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 30 20:52:13 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RgiUu-0004DG-Oe for ged-emacs-devel@m.gmane.org; Fri, 30 Dec 2011 20:52:13 +0100 Original-Received: from localhost ([::1]:37720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgiUu-00029n-4c for ged-emacs-devel@m.gmane.org; Fri, 30 Dec 2011 14:52:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:41098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgiUr-00029X-GB for emacs-devel@gnu.org; Fri, 30 Dec 2011 14:52:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgiUq-0003V5-8b for emacs-devel@gnu.org; Fri, 30 Dec 2011 14:52:09 -0500 Original-Received: from mail-pw0-f41.google.com ([209.85.160.41]:37146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgiUp-0003V1-VS for emacs-devel@gnu.org; Fri, 30 Dec 2011 14:52:08 -0500 Original-Received: by pbdd2 with SMTP id d2so9199288pbd.0 for ; Fri, 30 Dec 2011 11:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UiVANSj674Mth/TujdzsIDQgznmhyGWkNy2yq6ESHIA=; b=XkEUgnkkyD2bmX/wBcR5J/iVUh+lEeJcXuNJMIdeqDEjskOHKFJ5SsBG+P7zWiClnY sNlps3AtIUnO0wuJ4TGYhQxiJEFAqJ2qAGCSsX4E0Rr1SUOlfEVvsDVBrfNPeokGxaM3 k6h3yWkcdE2qEMtR0fEOxNbdzq4xjTygdDjjY= Original-Received: by 10.68.72.70 with SMTP id b6mr96885786pbv.58.1325274726349; Fri, 30 Dec 2011 11:52:06 -0800 (PST) Original-Received: by 10.68.71.230 with HTTP; Fri, 30 Dec 2011 11:52:06 -0800 (PST) In-Reply-To: <87r4zm80kf.fsf@engster.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.160.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147065 Archived-At: --f46d041702a74b3ba704b5549152 Content-Type: text/plain; charset=ISO-8859-1 Yes. You're right. That solved all my problems with code completion. To be precise I added these lines(with defvar with initial value): (defvar semantic-lex-c-preprocessor-symbol-file '()) (add-to-list 'semantic-lex-c-preprocessor-symbol-file "/usr/include/OGRE/OgrePlatform.h") Otherwise emacs threw void variable error. Thanks! Slava On Fri, Dec 30, 2011 at 4:51 PM, David Engster wrote: > Vyacheslav Gonakhchyan writes: > >>Could you please provide an example, showing what you're trying to > >>complete and what member functions you would expect to appear? > > Attached zip file with project. There are two markers in code(Tut.cpp): > > [...] > > Thanks; I could reproduce these issues. I think the main problem is with > preprocessor macros in class definitions, like > > class _OgreExport Light : public MovableObject > > While you have defined _OgreExport in your project definition, this will > only apply to your own project files, not to system headers. I think the > easiest way to fix this is to use > > (add-to-list 'semantic-lex-c-preprocessor-symbol-file > '"/usr/include/OGRE/OgrePlatform.h") > > You'll have to exit Emacs and delete all files in ~/.semanticdb to make > Semantic reparse the headers. > > -David > --f46d041702a74b3ba704b5549152 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes. You're right. That solved all my problems with code completion.To be precise I added these lines(with defvar with initial value):
(def= var semantic-lex-c-preprocessor-symbol-file '())
(add-to-list 's= emantic-lex-c-preprocessor-symbol-file "/usr/include/OGRE/OgrePlatform= .h")
Otherwise emacs threw void variable error.

Thanks!

Slava
<= br>
On Fri, Dec 30, 2011 at 4:51 PM, David Engste= r <deng@random= sample.de> wrote:
Vyacheslav Gonakhchyan wri= tes:
>>Could you please provide an example, showing what you're trying= to
>>complete and what member functions you would expect to appear?
> Attached zip file with project. There are two markers in code(Tut.cpp)= :

[...]

Thanks; I could reproduce these issues. I think the main problem is with preprocessor macros in class definitions, like

=A0 =A0class _OgreExport Light : public MovableObject

While you have defined _OgreExport in your project definition, this will only apply to your own project files, not to system headers. I think the easiest way to fix this is to use

(add-to-list 'semantic-lex-c-preprocessor-symbol-file
=A0 =A0 =A0 =A0 =A0 =A0 '"/usr/include/OGRE/OgrePlatform.h")=

You'll have to exit Emacs and delete all files in ~/.semanticdb to make=
Semantic reparse the headers.

-David

--f46d041702a74b3ba704b5549152--