csdms / babelizer

Transform BMI-wrapped models into Python packages
https://babelizer.readthedocs.io
MIT License
4 stars 3 forks source link

Add C++ example #101

Open aufdenkampe opened 2 months ago

aufdenkampe commented 2 months ago

As mentioned in https://github.com/csdms/babelizer/pull/97#issuecomment-2037683402:

Unfortunately, @Volk3rJ, @ptomasula, and I had quite a bit of trouble following your previous Babelizer documentation to build https://github.com/csdms/bmi-example-cxx. We're hoping for more success with this meson build approach.

Can you provide a C++ example?

Such an example would help us understand what's happening under-the-hood, especially with how object-oriented C++ objects and functions are exchanged as primitive types among other languages with BMI.

aufdenkampe commented 1 month ago

This example works for MacOS but not on Windows, as mentioned with https://github.com/csdms/babelizer/pull/105#issuecomment-2073405346, but @Volk3rJ had issues on Linux, as mentioned in #107.

Both of us used a conda environment created from the head of the mdpiper/add-cxx-example branch using this file: https://github.com/LimnoTech/babelizer-examples/blob/main/environment.yml.

It would be great to keep up the momentum on fixing these issues with Babelizer and merge these outstanding PRs: