Closed zilti closed 3 years ago
what do you mean?
Fails to be used from a C project. I include the DOtherSide.h header, which only works when I use g++, not when using normal gcc in C mode.
please report the errors
the DOtherSideTypes should have code like this
/// \brief Store an array of QVariant
/// \note This struct should be freed by calling dos_qvariantarray_delete(DosQVariantArray *ptr). This in turn
/// cleans up the internal array
struct DosQVariantArray {
/// The number of elements
int size;
/// The array
DosQVariant **data;
};
#ifndef __cplusplus
typedef struct DosQVariantArray DosQVariantArray;
#endif
thus defining the c structs
@zilti can you please post the error?
dotherside/lib/include/DOtherSide/DOtherSide.h:58:59: error: unknown type name ‘DosQEventLoopProcessEventFlag’
DOS_API void DOS_CALL dos_qcoreapplication_process_events(DosQEventLoopProcessEventFlag flags = DosQEventLoopProcessEventFlag::DosQEventLoopProcessEventFlagProcessAllEvents);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/zilti/projects/qml/qml.lowlevel.c:11:0:
dotherside/lib/include/DOtherSide/DOtherSide.h:61:65: error: unknown type name ‘DosQEventLoopProcessEventFlag’
DOS_API void DOS_CALL dos_qcoreapplication_process_events_timed(DosQEventLoopProcessEventFlag flags, int ms);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dotherside/lib/include/DOtherSide/DOtherSide.h:463:53: error: unknown type name ‘DosQtConnectionType’
DosQtConnectionType connection_type);
^~~~~~~~~~~~~~~~~~~
dotherside/lib/include/DOtherSide/DOtherSide.h:756:50: error: unknown type name ‘DosQtConnectionType’
DosQtConnectionType connection_type);
As the title says. This fails to compile with a C compiler. First, the typedefs for the enums are missing. Then, I am not too versed in C itself, but it seems it is not possible to set default values for function parameters.