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
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.
mmm no.. it's not running even typing 4 chars
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
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
I think the problem is, that externs are skipped (http://forums.next.codeblocks.org/index.php/topic,8422.0.html).
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
AFAIK, macro are not managed by code completion plugin, that's why your symbols are not found.
Dje
Preprocessor parsing can be enabled in the editor settings dialog:
(http://img53.imageshack.us/img53/8319/preprocessorle8.png)
Using a patched version (look at the link, posted above), that does not skip externs, completion with gl... functions works for me:
(http://img391.imageshack.us/img391/9634/glcompletionmk9.png)
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