Home Help Center

How do YOU handle redundant generated slice code?

ctennisctennis Member Caleb TennisOrganization: AEIProject: Project GINA ✭✭✭
In my projects, I used to have my build scripts automatically run slice2cpp to include ice files into each project. However, I may have multiple programs on the same machine utilizing the same generated slice2cpp code. So, recently I switched over to creating shared libraries just for generated slice2cpp code and linking that into each of the projects that need it.

I'm curious how various Ice users are utilizing the generated C++ code on their setups. Do you automate the slice2cpp run process?

Comments

  • acbellacbell Member Andrew BellOrganization: Iowa State UniversityProject: National Resources Inventory ✭✭
    I'm curious how various Ice users are utilizing the generated C++ code on their setups. Do you automate the slice2cpp run process?

    Of course! That's what build systems are for!

    Whether you should build things into a shared library or not depends on your system requirements. Shared libraries were especially important back when physical memory was a scare resource, but now that's not much of an issue for most people, unless you're writing for an embedded system. You lose some flexibility with the shared library approach, but that may or may not be a problem for your particular installation.

    Cheers,
Sign In or Register to comment.