Hi Guys!
I have been trying to create a custom library that I would like to load into CINT. This is what I have so far:
mean.h
mean.cpp
[code]#include “mean.h”
int mean(int a, int b)
{
return (a+b)/2;
}
[/code]
extlib.h
[code] #ifndef EXTLIB
#define EXTLIB
#ifndef __MAKECINT__
// Include extlib's original header file here.
// This part is only read by C++ compiler.
#include "mean.h"
#else // __MAKECINT__
// Declare interface to the external library.
// This part is read by cint/makecint only and
// must be described within cint limitation.
// #pragma link statements can be added as option.
void mean(int a, int b);
#pragma link C++ function mean;
#endif // __MAKECINT__
#endif // EXTLIB
[/code]
Makefile
all: mean.o
gcc -shared -Wl,-soname,libmean.so.1 -o libmean.so.1.0.1
ln -s libmean.so.1.0.1 libmean.so.1
ln -s libmean.so.1.0.1 libmean.so
I then run the following commands
makecint -mk makefile2 -dl extlib.dll -H extlib.h -l libmean.so
make -f makefile2
which produces extlib.dll
Then I run
cint extlib.dll
mean(2,4)
cint: symbol lookup error: ./extlib.dll: undefined symbol: _Z4meanii
Any suggestions on how to fix this problem?
Radu