g++ newbe help
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 186 from 2003/10/23
    hi, i'm trying to compile a little proggy in g++
    but at the begginning,after the inclusion of

    #include <tgl/gla.h>

    the compiler tells me :

    gla.h:15 error expected unqualified-id before 'int'

    but in gla.h at the 15 line there is only

    int GLAInitializeContextWindowed(GLContext *context, void *w);

    any tips?
    I'm nerdy in the extreme
    And whiter than sour cream

    White&Nerdy 2006 Al Yankovic
  • »20.03.12 - 00:14
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    koan
    Posts: 303 from 2005/11/21
    From: UK
    Without seeing more of your code it is difficult to know why you get this error.

    Probably something to do with a #define on a prior line not being completely defined; it could be that you should not directly include this file but some higher level header file. When I google "#include <tgl/gla.h>" I cannot easily find any hits that do this apart from your post which suggests to me that directly including this file is not usual.
  • »23.03.12 - 14:51
    Profile
  • MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    Problem is before line 15. Perhaps missing ';' before #include directive? If you cant figure it out you can try compiling with -E switch. It produces preprocessor output you can examine to find problem.
    1 + 1 = 3 with very large values of 1
  • »23.03.12 - 17:10
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 186 from 2003/10/23
    ok, i will try with the -E switch (it's surely my fault, but i don't know where the error is)

    @koan
    the GLA include is the GL->morphos interface, most game/proggy are based on GLUT or SDL+GL, but if u want to open an intuition windows and render to it with opengl, u must use this interface :D
    I'm nerdy in the extreme
    And whiter than sour cream

    White&Nerdy 2006 Al Yankovic
  • »24.03.12 - 12:07
    Profile
  • MorphOS Developer
    Henes
    Posts: 507 from 2003/6/14
    I do not think this is the cause for your problem right now, but it seems this header is missing support for C++.
    i.e. missing extern "C", you can check other header files to see how to fix it by yourself.
  • »24.03.12 - 12:14
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 186 from 2003/10/23
    yes, i've seen it (the lack of it :D :D ), i will add it ^_^
    I'm nerdy in the extreme
    And whiter than sour cream

    White&Nerdy 2006 Al Yankovic
  • »24.03.12 - 13:22
    Profile