osmium-org / libdogma

An ad hoc fitting engine for the EVE Online multiplayer game.
GNU Affero General Public License v3.0
30 stars 7 forks source link

library not compatible with c++ #3

Closed bastianh closed 10 years ago

bastianh commented 10 years ago

Hi,

I tried to continue a project I began some time ago ( a python wrapper for libdogma ) and ran into problems when I tried to compile it the latest libdogma version.

The problem is that I was using c++ ( so I could use classes as objects with constructors and deconstructors ;) ) but libdogma is not longer compatible with c++.

/usr/local/include/dogma-extra.h:47:15: error: expected type-specifier before ‘;’ token
  char operator; /* '=', '+', '-' or '*' depending on operation */

The problem is "operator" is a reserved word in c++.

Artefact2 commented 10 years ago

Hi Bastian,

libdogma was never intended to be compatible with C++, sorry.

If you are looking for python bindings, jboning has something you might find useful: https://github.com/jboning/python-dogma

Regards, Romain

bastianh commented 10 years ago

Thanks... I like my class based approach more and when I integrated it into my scripts a year ago python-dogma was not available. I changed my c++ swig bindings into c and it was easier as I thought. https://github.com/bastianh/dogma_module_c/