Using makecint embeded more classes

i have made the Complex demo successfully.but when i execute the generated Complex.exe.the behavior is wierd.

cint : C/C++ interpreter  (mailing list 'cint@root.cern.ch')
   Copyright(c) : 1995~2005 Masaharu Goto (gotom@hanno.jp)
   revision     : 7.3.00, December 21, 2008 by M.Goto

No main() function found in given source file. Interactive interface started.
'h':help, 'q':quit, '{statements;}' or 'p [expr]' to evaluate

Complex.exe> 2+3
Unknown interpreter command '2+3'
Complex.exe> pow(2.0,3.0)
(const double)3.00000000000000000e+000
Complex.exe> .files
!!!Debugger Command mode switched as follows!!!
    > .[command]
    > [statement]
Complex.exe> .files
  0 fp=0x00007c3ab698 lines=34   file="stdio.h"
  1 fp=0x00007c3ab6b8 lines=34   file="bool.h"
  2 fp=0x000000000000 lines=0    file="stdfunc.dll"
  3 fp=0x00007c3ab6d8 lines=8    file="math.h"
  4 fp=0x00007c3ab6f8 lines=13   file="iostream"
  5 fp=0x00007c3ab718 lines=479  file="iostream.h"
  6 fp=0x00007c3ab738 lines=66   file="iosenum.h"
  7 fp=0x00007c3ab758 lines=173  file="_iostream"

Complex.exe> 2+3
(int)5
Complex.exe> pow(2.0,3.0)
(double)8.00000000000000000e+000
Complex.exe>

why at beginning the “2+3”,“.files”,“pow(2.0.2.0) is not functional”?
2.
i want to embed more classes into cint, eventually i would embed a framework(for example: Qt) to produce a root-like system(the Root system is using Root as its framework,while my new system not using Root).what should i do?i think there has two ways:

[quote]
1>like the example of Complex below:
“make -mk Makefile -o Complex.exe -H Complex.h -C++ Complex.c”
i can compile all the headers and cxx files into the generated exe file.but the generated exe file will be so huge.and this solution is not extensive.[/quote]

3.i also want achieve the Tab hints.how can i add this feature into my root-like system?

  1. if i want to integrate Qt into the cint.what should i do?
    would you mind tell me the details of how to do?

[quote]Complex.exe> 2+3
Unknown interpreter command '2+3’
Complex.exe> pow(2.0,3.0) [/quote]In standalone CINT, the default is to be in ‘indirect mode’ where the CINT meta command do not requires a leading ‘dot’ and the C++ code requires surrounding brackets.

So do Complex.exe> { 2+3; } (int)5 Complex.exe> files 0 fp=0x00007c3ab698 lines=34 file="stdio.h" ...

As explicitly mentioned in the output, if you use a leading ‘dot’ for CINT meta command, CINT switch to the other mode:Complex.exe> .files !!!Debugger Command mode switched as follows!!! > .[command] > [statement] where CINT meta command require a leading dot and C++ code do not require surrounding brackets.

Cheers,
Philippe.

[quote]i want to embed more classes into cint, eventually i would embed a framework(for example: Qt) to produce a root-like system(the Root system is using Root as its framework,while my new system not using Root).what should i do?i think there has two ways[/quote]makecint intent is to make it easier to get started and is designed for only one library. For more complex case, you ought to ‘inspire’ yourself from the makefile generated by makecint to build your own makefile.

Note that ‘rootcint’ the dictionary generator bundled with ROOT is a bit more user friendly than pure cint.

Cheers,
Philippe.

  • easy dictionary generation
  • tab completion
  • qt interaction (minimal with pure root, more complete with extra library).
    [/ul]

Cheers,
Philippe

[quote]3.i also want achieve the Tab hints.how can i add this feature into my root-like system? [/quote]See how the TTabCom class is implemented and ‘hook-in’ in ROOT.

Cheers,
Philippe.

[quote]4. if i want to integrate Qt into the cint.what should i do?
would you mind tell me the details of how to do?[/quote]That depends what you mean. See cint/*/lib/qt for how to generate a dictionary for QT.

Cheers,
Philippe.

what we want is to use Qt as the FrameWork.
The Root FrameWork is very powerful.
but it seems not too suitable for us.
anyway, the Root system 's intention is for the High energy phsics.we are more concern the drawing system.
So we want to change the Root FrameWork to Qt FrameWork.

can you give me some advice on how to change the FrameWork from Root to Qt?

i am still don’t make very clear about all the stuff.

[quote]The Root FrameWork is very powerful.
but it seems not too suitable for us.
[/quote]
Could you indicate what are your particular requirements that makes ROOT not suitable for your application?

[quote]can you give me some advice on how to change the FrameWork from Root to Qt?
[/quote]
If you want to use only Qt see with the Qt support.
if you want to use the Qt driver within ROOT (not recommended) replace the following 2 lines in $ROOTSYS/etc/system.rootrc

Gui.Backend: native Gui.Factory: native
by

Gui.Backend: qt Gui.Factory: qt
Rene