I would like to create some libraries in C++, these libraries will be able to model physical phenomena. I would like to build a cross-platform environment where these libraries are updated independent of the GUI, in my case a PC application and a iOS app would be the clients of such libraries.
In terms of performance, easiness to plug C++ code, etc., what would be your recommendation? to generate a C++ classes and call them from other classes with the .mm extension or to generate a framework in c++.
Would you recommend something different to C++ for cross-platform compatibility?
NB: I am not an experienced programmer but trying to get into a decent level.
Thanks,
Alejandro
It depends on the platforms you are aiming to support, but C++ is pretty well supported, so I think there should be no issues at all. C++ is also pretty low-level, so it will give you all the performance you need.
When it comes to the concept of framework, though, you should beware. Usually, a framework gives you a set of classes which you reuse in several ways. One, possibly the most important way is by subclassing (i.e., you subclass and specify a missing method, or specialize a generic method). You could not really do this, like in: an Objective-C class deriving from a C++ class — this is not possible (unless you define some kind of wrapper or bridge).
So you would have your C++ framework, that you can extend using C++, and use from other languages, e.g., Objective C.
Again, as above, but C++ is better than other options (Java, e.g., which is not supported on iOS, and less and less supported on MacOS, the major platforms using ObjC). Possibly only C could give you wider portability.