while,i have a thirdlib.h and thirdlib.lib,the contents of the thirdlib.h is as follows:
namespace DataWell
{
extern "C"
{
int UFDataInit();
int UFCreateWell(const char *,const char*);
int UFDataExit();
}
}
i use “makecint -mk makefile -H thirdlib.h -C++ thirdlib.lib -dl thirdparty.dll” & “make” to generate the thirdparty.dll and thirdparty.lib
then i use cint to intepret a cpp file: test.cpp.the content of test.cpp is as follows:
using namespace DataWell;
int test()
{
UFDataInit();
UFCreateWell("c:\\","demo");
UFDataExit();
}
cint> .L thirdparty.dll
!!!Debugger Command mode switched as follows!!!
> .[command]
> [statement]
cint> .L test.cpp
Error: namespace DataWell is not defined test.cpp(1)
!!!Dictionary position rewound... !!!Error recovered!!!
cint> .L thirdparty.dll
cint> .L test.cpp
cint> test();
cint>
i use cint run the test.cpp successfully.but when i use root,it reports error:
root [0] .L thirdparty.dll
root [1] .L test.cpp
root [2] test()
Error: C++ exception caught D:\Lead\Bin\test.cpp(6)
(int)0
*** Interpreter error recovered ***
root [3]
i try to use root to debug the test.cpp,and it is the fault of the UFCreateWell function.
y there is a C++ exception?
is that means the root can not load the makecint generated dll?
i just don’t know what the problem is ?
where does the exception from?
y is it success in using cint, while error in using root?
BTW, i add the thirdparty.dll to the $RootSys\bin,thirdparty.lib to the $RootSys\lib
and write a thirdparty.rootmap myself:
Library.DataWell: thirdparty.dll
is this solution available?