Hi Tom,
when you build ROOT do:
./configure
make
make static
the last step will build lib/libRoot.a
Now use libRoot.a to link your own app against. The linker will take only the needed modules from libRoot.a. This will make you app standalone.
With the coming release ROOT is also independent of ROOTSYS being set or not.
Cheers, Fons.
> Subject: [ROOT] [Roottalk] Request for new library
> Date: Fri, 20 Jun 2008 09:54:46 -0500
> From: Tom Roberts <tjrob_at_fnal.gov>
> To: 'ROOT Talk' <roottalk_at_pcroot.cern.ch>
>
> The library shuffling that happened in release 1.18 leads me to make a
> request on behalf of myself and all other developers who support a
> program that uses Root I/O.
>
> Please build a static library containing just what is necessary to read
> and write Root files. In earlier versions this required just 3
> libraries: libCore, libCint, and libTree. I want it static so I never
> again have subtle Root-version bugs when my users have a different
> version of Root installed. Note it is infeasible for me to require my
> users to build from source. I would like this to be a supported
> capability, so I can migrate to newer versions of Root without problems.
> Please make it work sensibly even if Root is not installed and ROOTSYS
> is not defined (1.12 works, but emits an obscure warning that confuses
> my users).
>
> At present I am building with Root 1.12, and include a copy of the 3
> shared-objects in my distribution, along with scripts that find them at
> run time independent of any Root installation. But I do not think it is
> wise to remain frozen using an ancient release of Root (I can probably
> migrate to 1.16, but that is not a permanent solution).
>
> In the past there was "RIO", which appeared to do this. I never used it
> because it did not seem to be "real" Root. What is the relationship
> between that and Root itself? Is that a viable solution to this?
>
> Note that I support Windows, Mac OS X (Intel), and Linux (Intel), so a
> portable solution is preferred.
>
>
> Tom Roberts
-- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers_at_cern.ch Phone: +41 22 7679248 WWW: http://fons.rademakers.org Fax: +41 22 7669640Received on Sat Jun 21 2008 - 13:28:55 CEST
This archive was generated by hypermail 2.2.0 : Mon Jun 23 2008 - 11:50:01 CEST