Dear all,
I’m trying to link cint (and ideally also root) with an external library and/or
object file, so that I can access its functions and/or classes. To make
thinks simple, I have created a very small class “simple” - see the code at
the end of this mail.
My cint installation stems from root (5.08, freshly compiled) and is installed
below /opt/root . I can call both root and cint on the command line and e.g.
execute a printf statement, so presumably the compilation and installation
worked as expected.
I am following the procedure from the makecint man page. However,
already my first attempt fails. I have created an object file from the
source quoted below (which I know works, as I have tried it out with
a corresponding main() function.
I have then called:
makecint -mk Makefile -o mycint -H simple.h simple.o
which responds with
Makefile is created. Makecint success
However, calling “make” just results in the message:
make: *** Keine Regel vorhanden, um das Target »/opt/root//lib/root/cint/main/G__setup.c«,
benötigt von »G__setup.o«, zu erstellen. Schluss.
Which just means that /opt/root//lib/root/cint/main/G__setup.c
does not exist. There is indeed no such file below /opt/root .
I have then tried to only install cint 5.16 (excluding root), both using
platform/gcc_max and platform/linux_RH7.3_so, which failed
with differing error messages.
This is on a SuSE 10.0 Linux system, gcc 4.02, kernel 2.6.13 .
It would be sufficient for my purpose if I could just load a
shared library - no static linkage would be necessary. To be
concrete, I want to have access to the “ncurses” library from
inside cint/root . Ideally I would not want to modify the ncurses
source code in any way.
Thanks for any help,
Ruediger Berlich
/************ simple.C ***************/
#include “simple.h”
simple::simple()
{
writeHello();
}
simple::~simple(){}
void simple::writeHello()
{
cout << “Hello World” << endl;
}
/************ simple.h ***************/
#include
#ifndef _SIMPLE_H
#define _SIMPLE_H
using namespace std;
class simple
{
public:
simple(void);
~simple();
private:
void writeHello(void);
};
#endif /* _SIMPLE_H */
/****** MAKEFINFO from root installation **************/
CC = gcc
CPP = g++
CPREP = gcc -E -C
CPPPREP = g++ -E -C
CSRCPOST = .c
CHDRPOST = .h
CPPSRCPOST = .C
CPPHDRPOST = .h
OBJPOST = .o
DLLPOST = .so