OMNeT++ Community Site
  Welcome to OMNeT++ Community Site Monday, October 13 2008 

Mailing list archive (omnetpp-l at omnetpp.org)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omnetpp-l] omnet with cgal library: compilation problem because of macros



Hi,

I'm trying to use the cgal library within the omnet network simulator.
I get lot of compile errors because of macros when including
cgal headers in my files.

Here's a partial snapshot of what I get:

------
g++ -c -O2 -DNDEBUG=1   -DWITH_PARSIM -DWITH_NETBUILDER  -I/opt/omnetpp/include
txc1.cc
In file included from /usr/include/CGAL/gmpxx.h:43,
                from /usr/include/CGAL/number_type_basic.h:91,
                from /usr/include/CGAL/basic.h:35,
                from /usr/include/CGAL/Cartesian/Cartesian_base.h:29,
                from /usr/include/CGAL/Cartesian.h:27,
                from txc1.cc:7:
/usr/include/gmpxx.h:3103:62: error: macro "sgn" passed 2 arguments, but takes
just 1
------


I've tried to place #undef sgn in gmpxx.h, but there are still problems
(maybe because the macro is used somewhere, and I'm undefining it).
Here's another partial snapshot of the errors:

------
In file included from /usr/include/CGAL/number_type_basic.h:68,
                from /usr/include/CGAL/basic.h:35,
                from /usr/include/CGAL/Cartesian/Cartesian_base.h:29,
                from /usr/include/CGAL/Cartesian.h:27,
                from txc1.cc:7:
/usr/include/CGAL/utils_classes.h:65: error: expected unqualified-id before
'{' token
/usr/include/CGAL/utils_classes.h:66: error: 'c_' was not declared in this
scope
/usr/include/CGAL/utils_classes.h:66: error: a function call cannot appear in a
constant-expression
/usr/include/CGAL/utils_classes.h:66: error: expected ';' before '{'
token
/usr/include/CGAL/utils_classes.h:67: error: expected `;' before 'NT'
/usr/include/CGAL/utils_classes.h:75: error: expected unqualified-id before
'{' token
/usr/include/CGAL/utils_classes.h:76: error: 'c_' was not declared in this
scope
/usr/include/CGAL/utils_classes.h:76: error: a function call cannot appear in a
constant-expression
/usr/include/CGAL/utils_classes.h:76: error: expected ';' before '{'
token
/usr/include/CGAL/utils_classes.h:77: error: expected `;' before 'NT'
------


I'm working under ubuntu linux, g++ version 4.2.3.
What am I missing? Is there a way to override this problem?

Thanks in advance.

Regards, Paolo
_______________________________________________
Omnetpp-l mailing list
Omnetpp-l at xxx
http://lists.omnetpp.org/mailman/listinfo/omnetpp-l

Home | Main Index | Thread Index


 Copyright © 2008 OMNeT++ Community Site
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By GeekLog v1.3.7sr1 
Page created in 0.04 seconds