Question

I'm searching for an elegant and practical way of sharing a model between 2 differents programs whithout compiling them separately.

I am developing 2 differents software for the same customer. Both share the same functionality in a different way (volume filling optimisation). But the user interface is both heavy and different therefore i wish to split them in 2 different software for clarity.

But in order to reuse code and make it easily maintainable i wish for an architechture like a core and two separated/specialized layer for each soft.

I thought about creating a .dll or .so that both apps would share it but i am develloping on linux and the customer is using windows, so i find it quite heavy to port the application this way. (I don't own any computer running windows so i'm going for a late port)

I also thought about creating a command line program as the core and calling it through the shell while running the softs, but this seems impossible to do in a portable way.

Is there a simple and portable way of doing this (much like importing modules in python) i didn't find about in c++? or if not, would it be best to use a shared library or compile both softs with the core included?

Was it helpful?

Solution

"compile both softs with the core included" - Is preferred for the sake of convenience from the point of view of a developer.

If you really want to use a piece of compiled crossplatform code you'll probable have to write a c-style dll.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top