problem with code completion and opengl

Adam C. nospam at xibo.at
Wed Mar 16 16:47:35 GMT 2011


On Tue, 15 Mar 2011 21:38:09 +0100, Milian Wolff <mail at milianw.de> wrote:

> Adam C., 13.03.2011:
>> On Sun, 13 Mar 2011 16:49:20 +0100, Adam C. <nospam at xibo.at> wrote:
>> > hi,
>> > i'm using kdevelop 4.2.0 from opensuse 11.3 repositories. i wan't to  
>> code
>> > opengl stuff and code completion would be very cool, but it doesn't  
>> work
>> > for all functions. I've found an entry in the faq [1], but it doesn't
>> > help, because i have no project settings entry [2][3].
>> >
>> > i've created a sample project, which you can find in here:
>> >  
>> http://xibo.at/meine/kdevnocodecompletion/opengl_no_codecompletion.tar.gz
>>
>> > and here is a screenshot of my problem with further explanations:
>> sorry, here is the link:
>> http://xibo.at/meine/kdevnocodecompletion/problemscreenshot.png
>>
>> > i don't know, if this is a lokal issue or a bug or.. but i would love  
>> to
>> > have it working.
>
> I bet it's a matter of defines not getting passed along properly. Tell  
> us what
> build tool you are using (cmake, or custom make, or ...) and find out  
> where
> the functions you try to access are defined and by what #ifdef's they are
> guarded.
>
> bye

i'm using cmake and i found out, that the completion is working somehow in  
qtcreator. no help with parameters, but at least with the function name.

creator tells me, that glGenBuffers is defined in glew.h (which i'm  
including directly) as a macro:
==
#ifndef GLAPI
#define GLAPI extern
#endif
#ifndef GLAPIENTRY
#define GLAPIENTRY
#endif
..
typedef void (GLAPIENTRY * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint*  
buffers);
..
#define glGenBuffers GLEW_GET_FUN(__glewGenBuffers)
..
GLEW_FUN_EXPORT PFNGLGENBUFFERSPROC __glewGenBuffers;
..
#define GLEW_GET_FUN(x) x
..
==
(i believe, that this are the important parts.

my conclusion is, that the parser doesn't understand macros or it doesn't  
work here. if this is correct, then this is a feature request?

bye

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/




More information about the KDevelop mailing list