Problem calling compiled member function from script

Hello,
I am working with win32gdk on win2k w/ msvc++ 6.0 compiler. Problem I report is w/ v4.00.03. I have a .dll build w/ root that includes the following class:class CImagoRoot : public TGMainFrame { ... public: void OpenAnalyzed(char *fname=0); ClassDef(CImagoRoot,0) }
If I load the dll from the command line I get full accesses to the class methods, including OpenAnalyzed(). However, If I load the dll from a script and then attempt to access the OpenAnalyzed() method from that script, I get an error. Here’s my script:

[code]void maingui(char *fname="")
{
gROOT->Reset();
gSystem->Load(Form("%s/bin/analysis.dll",gRootDir));
CImagoRoot *pm = new CImagoRoot(gClient->GetRoot(),800,700);

// if fname is non-empty, its an analzed file - restore it...
if (fname && *fname) 
    {
        printf("Opening %s\n",fname);
        pm->Dump();                       // This call works
        pm->OpenAnalyzed(fname);  // this call fails
        gAn->m_pResolution->Draw();
        gPad->GetCanvas()->Update();
    }

}[/code] and here’s the command line that I run root with:root -l "c:\root\maingui.cpp(\"v:\\leap\\analyzeddata\\R1_1066901 072902Si_7 08-12-2002 v01.root\")"Below is the output that root generates when the above is entered at the command line. Note, once the errors are displayed and control returns to the console, I CAN call OpenAnaylzed() from the command - just not from within the script itself. Any ideas how I can overcome this problem are greatly appreciated! Thank you…

Ed

Output:

root [0]
Processing c:\root\maingui.cpp(“v:\leap\analyzeddata\R1_1066901 072902Si_7 08-12-2002 v01.root”)…
Opening v:\leap\analyzeddata\R1_1066901 072902Si_7 08-12-2002 v01.root
==>Dumping object at:46f9918, name=frame2, class=CImagoRoot

fBusy
fCorrectAll
fRecoPreviewRange -1
fRecoPreviewQuantile 0.1
*fTrash ->4726ee8 list of shutter items to delete
*fMenuFile ->47022e8
*fMenuView ->4716b20
*fMenuEdit ->4718a10

*fBindList ->46f9c48 list with key bindings
fWindowName ->46f9978 window name
fWindowName.*fData Leap - one atom at a time…
fIconName ->46f9980 icon name
fIconName.*fData
fIconPixmap ->46f9988 icon pixmap name
fIconPixmap.*fData
fClassName ->46f9990 WM class name
fClassName.*fData
fResourceName ->46f9998 WM resource name
fResourceName.*fData
fMWMValue 0 MWM decoration hints
fMWMFuncs 0 MWM functions
fMWMInput 0 MWM input modes
fWMX -1 WM x position
fWMY -1 WM y position
fWMWidth 743 WM width
fWMHeight 733 WM height
fWMMinWidth 4294967295 WM min width
fWMMinHeight 4294967295 WM min height
fWMMaxWidth 4294967295 WM max width
fWMMaxHeight 4294967295 WM max height
fWMWidthInc 4294967295 WM width increments
fWMHeightInc 4294967295 WM height increments
fWMInitState 0 WM initial state
*fLayoutManager ->46f9bf8 layout manager
*fList ->4629058 container of frame elements
fLayoutBroken no layout manager is used
fX 442 frame x position
fY 95 frame y position
fWidth 829 frame width
fHeight 836 frame height
fBorderWidth 0 frame border width
fOptions 3 frame options
fBackground 12632256 frame background color
fEventMask 195 currenty active event mask
*fParent ->446b570 Parent window
fNeedRedraw kTRUE if window needs to be redrawn
fName ->46f9934 name of the window used in SavePrimitive()
fName.*fData frame2
fId 74422960 X11/Win32 Window identifier
*fClient ->445f748 Connection to display server
fUniqueID 0 object unique identifier
fBits 50331648 bit field status word
*fListOfSignals ->4701778 ! list of signals from this object
*fListOfConnections ->0 ! list of connections to this object
Error: Can’t call CImagoRoot::OpenAnalyzed(fname) in current scope FILE:c:\root\maingui.cpp LINE:20
Possible candidates are…
filename line:size busy function type and name (in CImagoRoot)
filename line:size busy function type and name (in TGMainFrame)
filename line:size busy function type and name (in TGCompositeFrame)
filename line:size busy function type and name (in TGFrame)
filename line:size busy function type and name (in TGWindow)
filename line:size busy function type and name (in TGObject)
filename line:size busy function type and name (in TObject)
filename line:size busy function type and name (in TQObject)
Error: Symbol pm is not defined in current scope FILE:c:\root\maingui.cpp LINE:20
Error: Failed to evaluate pm->OpenAnalyzed(fname)Possible candidates are…
filename line:size busy function type and name
*** Interpreter error recovered ***
root [1]

Hi Ed,

With win32gdk on win2k w/ msvc++ 6.0 compiler and ROOT 4.00/02 (I recompiling with 03), I am unable to reproduce your problem (at least with the approximation I have). Could you send me a complete example?

Thanks,
Philippe.

Hi Phillipe,
Several hours later… I discovered an error on my end: the compiled method was mis-spelled in my script! I hope you did’nt spend too much time testing…

Note: tangentially related: When I compile a script using

.L program.cpp++

and the working folder has an embedded space, if fails. This may be an old problem (I seem to recall at one time windows users were cautioned against installing root in c:/program files/root - I thought that problem was fixed)

Thanks again for your prompt attention…

Ed

ACLiC still :frowning: can not handle white space if directory and file names.

Cheers,
Philippe.