[Lemon-user] lemon + glx

Adrien Angeli a.angeli at imperial.ac.uk
Tue Jan 18 13:04:35 CET 2011


Dear all,

I have troubles compiling some code which includes some of the lemon's
headers when the openGL header <GL/glx.h> is included as well.

Here is a simple example:

#include <GL/glx.h>
#include <lemon/smart_graph.h>


int main(int argc, char* argv[])
{
  std::cout << "Hello world." << std::endl;

  return 0;
}


When compiled using g++, without any compiler option, I obtain the
following error:

adrien at prunelli:~/Code/c-cpp/robotvision/testbed$ g++ -o lemon_glx lemon_glx.cpp
In file included from /usr/local/include/lemon/core.h:26,
                 from /usr/local/include/lemon/smart_graph.h:28,
                 from lemon_glx.cpp:3:
/usr/local/include/lemon/bits/enable_if.h:49: error: expected
identifier before numeric constant
/usr/local/include/lemon/bits/enable_if.h:49: error: expected
unqualified-id before numeric constant
/usr/local/include/lemon/bits/enable_if.h:59: error: expected
identifier before numeric constant
/usr/local/include/lemon/bits/enable_if.h:59: error: expected
unqualified-id before numeric constant
In file included from /usr/local/include/lemon/core.h:27,
                 from /usr/local/include/lemon/smart_graph.h:28,
                 from lemon_glx.cpp:3:
/usr/local/include/lemon/bits/traits.h:156: error: expected
unqualified-id before numeric constant
/usr/local/include/lemon/bits/traits.h:169: error: expected
unqualified-id before numeric constant
/usr/local/include/lemon/bits/traits.h:183: error: expected
unqualified-id before numeric constant
/usr/local/include/lemon/bits/traits.h:198: error: expected
unqualified-id before numeric constant
In file included from /usr/local/include/lemon/bits/map_extender.h:27,
                 from /usr/local/include/lemon/bits/graph_extender.h:24,
                 from /usr/local/include/lemon/smart_graph.h:30,
                 from lemon_glx.cpp:3:
/usr/local/include/lemon/concepts/maps.h:157: error: expected
unqualified-id before numeric constant
In file included from /usr/local/include/lemon/bits/array_map.h:25,
                 from /usr/local/include/lemon/bits/default_map.h:23,
                 from /usr/local/include/lemon/bits/graph_extender.h:25,
                 from /usr/local/include/lemon/smart_graph.h:30,
                 from lemon_glx.cpp:3:
/usr/local/include/lemon/bits/alteration_notifier.h:102: error:
expected unqualified-id before numeric constant
In file included from /usr/local/include/lemon/bits/default_map.h:23,
                 from /usr/local/include/lemon/bits/graph_extender.h:25,
                 from /usr/local/include/lemon/smart_graph.h:30,
                 from lemon_glx.cpp:3:
/usr/local/include/lemon/bits/array_map.h:54: error: expected
unqualified-id before numeric constant
In file included from /usr/local/include/lemon/bits/default_map.h:24,
                 from /usr/local/include/lemon/bits/graph_extender.h:25,
                 from /usr/local/include/lemon/smart_graph.h:30,
                 from lemon_glx.cpp:3:
/usr/local/include/lemon/bits/vector_map.h:63: error: expected
unqualified-id before numeric constant
In file included from /usr/local/include/lemon/smart_graph.h:30,
                 from lemon_glx.cpp:3:
/usr/local/include/lemon/bits/graph_extender.h:338: error: expected
unqualified-id before numeric constant
In file included from lemon_glx.cpp:3:
/usr/local/include/lemon/smart_graph.h:66: error: expected
unqualified-id before numeric constant
/usr/local/include/lemon/smart_graph.h:67: error: expected
unqualified-id before numeric constant
/usr/local/include/lemon/smart_graph.h:472: error: expected
unqualified-id before numeric constant
/usr/local/include/lemon/smart_graph.h:473: error: expected
unqualified-id before numeric constant
/usr/local/include/lemon/smart_graph.h:474: error: expected
unqualified-id before numeric constant


If I invert the order of the 2 headers, then everything is fine.


I'm using:
 - g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
 - lemon1.2.1 (the one from the archive downloadable on the website)
 - the standard openGL headers which come with the ubuntu distribution 10.04

Thanks a lot in advance for your help!
Adrien


-- 
Dr Adrien Angeli
Research Associate in Robot Vision
Department of Computing
Huxley Building
180 Queen's Gate
South Kensington Campus
Imperial College London
SW7 2AZ, UK

http://www.doc.ic.ac.uk/~aangeli



More information about the Lemon-user mailing list