News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

OpenGL Auto Completion

Started by rust, May 19, 2008, 05:04:00 PM

Previous topic - Next topic

rust

hello everyone,

I'm new at Code::Blocks. I have to work on a OpenGL Project, so I downloaded C::B for Mac (intel) for my macbook.

I followed wizard to create a simple glut application ( GLUT Shapes Demo
). GLUT example is running but in the editor auto Completion is not working.

I tried to write gl... (ctrl+space) in the existing code, but nothing.

Any ideas?

thank you

Deschamps

If I'm not wrong, code completion needs at least you write 4 chars (for objects or members names) before it shows you the possible choices.

Regards.
Those who were seen dancing were thought to be insane by those who could not hear the music

rust

mmm no.. it's not running even typing 4 chars

XayC

The Code Completion plug-in has some known issues. It may not be able to correctly parse some headers; if the OpenGL/GLUT header that you are using is one of them I don't know, but it may be the cause of your problem.

If you want more information about this you can look in the Code Completion Redesign section of the forums or in the bugs list for the Code Completion component on Berlios.

Regards, XayC

dje

Quote from: Deschamps on May 19, 2008, 10:19:40 PM
If I'm not wrong, code completion needs at least you write 4 chars (for objects or members names) before it shows you the possible choices.

Regards.


I think the 4 chars are those after which autocompletion panel appears automatically but you can press Ctrl+space before those 4 chars.

Dje

Ibbur

I think the problem is, that externs are skipped.

The gl... functions are preceded with the macro GLAPI. Now look, how GLAPI is defined in gl.h:
Quote from: gl.h#if !defined(GLAPI)
#  if defined(_MSC_VER)                        /* Microsoft Visual C++ */
#    define GLAPI __declspec(dllimport)
#  elif defined(__LCC__) && defined(__WIN32__) /* LCC-Win32 */
#    define GLAPI __stdcall
#  else                                        /* Others (e.g. MinGW, Cygwin, non-win32) */
#    define GLAPI extern
#  endif
#endif

dje

AFAIK, macro are not managed by code completion plugin, that's why your symbols are not found.

Dje

Ibbur

Preprocessor parsing can be enabled in the editor settings dialog:


Using a patched version (look at the link, posted above), that does not skip externs, completion with gl... functions works for me:

lowtraxx

Hi,

tried this workaround, but doesnt work here. (Applied the patch, but i think the file changed since the last entry.) Still getting no Autocompletion of gl.h. Does someone have another solution?

thx

Low