Skip to content
  • 0 Votes
    4 Posts
    139 Views
    A
    I managed to stumble across a solution. My problem was that the header files provided by the first CMake project have to be explicitly added to the qt_add_executable stanza so that the meta-object compiler picks them up, and when I first tried it the variable I thought I read them to was, in fact, empty. This is why I received so many linker errors when using the ifdef __cplusplus in the header file. The shared header file was being used through an #import statement but for some reason meta-object compiler only processed the header file which included it, not the shared header itself. After noticing that the variable was empty I explicitly added the header files to qt_add_executable, and much to my surprise the linker error is now gone, and everything works.
  • 0 Votes
    10 Posts
    4k Views
    A
    For anyone interested, I've started a set of such bindings here: https://github.com/seaqt/seaqt-gen - the output can be seen here: https://github.com/seaqt/seaqt - the project is based on miqt (go bindings) with the aim to expose as much functionality as possible to C such that it can be imported into any language that has good FFI / C interop capabilities (such as https://nim-lang.org/), though there is of course nothing preventing the use of these bindings from C natively - the generated code is actually pretty simple to follow / use.