Re: Static array indices in function parameter declarations
Marcel Holtmann <[email protected]> Tue, 25 Apr 2023 18:24:39 +0200
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
Hi James, >> I'm currently using ell for talking to dbus, and have found it way >> more convenient and easier to use as compared to gdbus, or any of the >> other bindings I've looked at. So many thanks. >> The extern "C" usage in the header files show the library is allowed >> to be compiled with C++ code. However the usage of the C99 feature >> that allows one to declare the index of the argument array using the >> 'static' keyword in some header files (like rtnl.h:110) seems to >> prevent this. >> Is there a workaround for this issue? Or should I submit a patch that >> removes all usage of this feature. > > Is this you're only issue compiling ELL with C++ code? I ask because I quickly tried: > > ~/ell$ g++ -o ell/rtnl.o ell/rtnl.c -I. > > And I got a TON of errors. Mostly void* pointer arithmetic and missing casts from void* to other types. and that was never the goal. You always have to build ELL with a C compiler. That you might be able to link against -lell from a C++ is an option, but our work just including the C++ boilerplate in the headers. And then it stopped exactly there. So we need external contributions if things do not work. Regards Marcel