SWIG - C

From arrizza.org wiki

Revision as of 09:14, 29 July 2023 by RoboUbu (talk | contribs) (remote update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Topic ⇦ SWIG - C Main Page ⇫ Up RaspberryPi ⇨ Next Topic
SWIG - C++ ⇨ Next Page

Source And Executable

https://bitbucket.org/arrizza-public/swig_examples

git clone git@bitbucket.org:arrizza-public/swig_examples.git

This repo is for C, for C++ click Next above.

Description

See https://bitbucket.org/arrizza-public/swig_examples/src/master/README.md for full up-to-date explanation

Note: SWIG did work ok for python and ruby but failed with javascript. There were compilation errors when I tried to use the swig generated file. see https://github.com/swig/swig/pull/1746, in short SWIG is not compatible with javascript v12 at this time. SWIG dev's were working on it in Oct 2020, but as of Nov 2020, no changes were released yet.

To overcome that problem, I used a slightly different technique, but was still able to compile using CMake and CLion.


Next Steps

  • current calls only use simple functions. Need to try on various other data structures:
    • strings
    • arrays
    • structs
    • unions
    • JSON
    • enums (i.e. read-only)
    • pointers (is this needed?)
Personal tools