Re: [ROOT] Using TF77 With Shared Library In Compiled Code

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Apr 15 2003 - 09:13:21 MEST


Hi Dan,

In your file TF77.hxx, replace the lines

#ifndef WIN32
#define type_of_call
#define DEFCHAR  const char*
#define PASSCHAR(string) string
#else /* WIN32 */

by

#ifndef WIN32
#define type_of_call
#define DEFCHAR  const char*
#define PASSCHAR(string) string
#define raslgf_ raslgf
#define daslgf_ daslgf

#define cpolyz_ cpolyz
#define wpolyz_ wpolyz
#else /* WIN32 */

Rene Brun
Dan Krop wrote:
> 
> Hello,
>         I am recompiling ROOT with the TF77 class to wrap CERNLIB functions.  I
> then use the TF77 in external shared libraries, and have a program which
> calls these external libraries.  The program runs fine under ACLiC, but
> when I modified it to compile an executable and link against the ROOT
> libraries, I get an error that one of the wrapped CERNLIB functins is
> undefined:
> 
> /usr/root/lib/libPWA.so: undefined reference to `daslgf_'
> 
> I know that I could rewrite the program and external libraries to not
> use the TF77 class and link directly to CERNLIB, but I was hoping to be
> able to use the same code under ACLiC and normal compilation.
>         I am using ROOT v3.05/02 under RH 7.3.  All the necessary files to
> reproduce this problem can be found at:
> 
> http://dustbunny.physics.indiana.edu/~dkrop/root_problems/
> 
>                                         Thanks in advance,
>                                                         Dan



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET