bind c++ code with ffi to flutter using a make file

Viewed 219

I guess this topic is a bit at the edge of my knowledge. I have (finally) managed to get the https://flutter.dev/docs/development/platform-integration/c-interop tutorial running. However, for my project I need to compile the cpp code with a complex make file. How would I do this?

So far I have not been successful in general to compile this with the Xcode IDE but only with its command line extension.

And how would you suggest to exchange data with the cpp plugin? As arguments I have an 2d array of approx size 50x50 and a vector of size 50. The return value would be roughly 150 data items which I could arrange as a vector, or more logically as 3 vectors of size 50 and some single values. I have not yet looked into exchanging more complex data structures, but was wondering, whether it makes sense to exchange all data via a JSON string?

PS: If someone else follows this tutorial and comes along my question here: In case you opened Xcode via Tools>Flutter>open_iOS_module_in_Xcode from Intellij Idea and try now to open Runner.xcworkspace, you already did so from Intellij. Alternatively you would open up Xcode, click open and search for Runner.xcworkspace located in the examples/iOS folder. Took me just 20-30 minutes to figure this out...

0 Answers
Related