cint FAQ

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Sun Dec 13 1998 - 07:55:31 MET


Users,

I post FAQ list for CINT. There are increasing number of questions and some
of them can be resolved by FAQ list like this. This FAQ list focuses on CINT.
In ROOT framework, there can be slightly different answer. 

Masaharu Goto

--------------------------------------------------------------------
CINT C++ interpreter Frequently Asked Questions

############################################################################
# Why cint does not support POSIX system calls, such as putenv, getpid, fork
  by default.

 In order to guarantee thorough portability among different computer platforms
,
 cint only supports what is defined in ANSI C/C++ standard. Anything out of
 ANSI standard is not included in cint default configuration.


############################################################################
# Can I use POSIX system calls from the interpreter?

 Yes, you can. With an optional library under lib/posix directory. Subset
 of POSIX.1 system calls prototypes are defined in lib/posix/posix.h. If
 you run setup script, include/posix.dll will be created. This DLL or
 shared library is used by include/unistd.h standard header.


############################################################################
# Can I use Win32 API from the interpreter?

 Yes, you can. With an optional library under lib/win32api directory. Subset
 of Win32 API prototypes are defined in lib/win32api/winfunc.h. If
 you run setup.bat script, include/win32api.dll will be created. This DLL or
 is used by include/windows.h standard header.


############################################################################
# Can I use STL in CINT?

 I like STL. The concept is great. However,using STL in CINT is a trouble 
 in general. Reasons are as follows.

  * STL is very complex and difficult to parse
  * Instantiated template can be precompiled, but templaet itself can not.
    This is a C++ limitation.
  * STL implementation comes with various compilers are still different at
    this moment(Dec/1998). It will take a few more years to provide platform
    independent STL solution in CINT.

 You can use STL in a limited way. 

  * Cint source package goes with an old STL (HP reference implementation) 
    which is in stl directory. You can interpret string, vector and list 
    containers and several generic algorithms.
  * If you use WindowsNT/9x with Visual C++, small set of precompiled STL 
    containers can be built under lib/stl directory. Run setup.bat script
    there.


############################################################################
# Can I embed my function and class library into CINT?

 Yes, CINT is made particulary for this needs.  Please read README.txt,
 doc/makecint.txt and other documentation.


############################################################################
# Cint does not work very well with #define macros. 

 For interactive convenience, cint parses macro and ordinaly C/C++ syntax
 at the same time. This makes it difficult to handle preprocessor macros.
 Please understand, cint has limitation in preprocessor macros. (Refer to
 doc/limitati.txt)

 You can eliminate define macro limitation by using -p or -P option. Cint
 invokes C/C++ preprocessor before interpretation. Name of the preprocessors
 are specified in $CINTSYSDIR/MAKEINFO file.


############################################################################
# scanf, fscanf, sscanf functions has limit in number of arguments. 

 scanf, fscanf and sscanf are implemented in strange way. If you give many
 arguments to those functions, cint displays error message and number of
 arguments you can give. The number includes the file pointer and formating
 string arguments, not only the input pointers.
 
 Use of ifstream, istrstream is recommended.


############################################################################
# Cint does not work and complains it can't find MAKEINFO file.

 Cint sometimes reads $CINTSYSDIR/MAKEINFO file for file name extention
 and preprocessor name. If you get this message, the reason is either

  * You do not set CINTSYSDIR environment variable.
      Please set CINTSYSDIR the directory you installed cint.
  * You did not install CINT properly and MAKEINFO file is missing.
      There are example of MAKEINFO files in platform directory. Please
      copy appropeate one as $CINTSYSDIR/MAKEINFO. Refer to platform/README.


############################################################################
# In most cases cint runs fast, but a small change makes it very slow. Why? 

 Cint uses incremental bytecode compilation technique. The bytecode compiler
 has size and syntax limitations. When you hit that limitation, cint runs
 10-20 times slower. Refer to doc/bytecode.txt for the detail.


############################################################################
# Can I turn on/off the bytecode compilation?

 Yes, you can. With '-O' command line option and 'O' debugger command. Refer
 to doc/cint.txt or cint online help.


############################################################################
# Can I get Cint binary for specific computer platform?

 Cint runs on nearly 20 different computer platforms and more than 40
 compiler-computer combinations. In general, the author distributes source 
 code package only. 

 There are Research labs and Institutes who distributes cint binaries for
 their benefit. And sometimes, Windows binary is distributed in CD-ROMs
 with books and magazines. Please use those resources.


############################################################################
# Can I re-distribute cint source and/or binary?

 Yes, you can. License term is described in README file.


############################################################################
# Is there CINT related news group or mailing list?

 roottalk@hpsalo.cern.ch is the mailing of CINT and ROOT framework. This
 mailing list is a mixture of CINT related topix and ROOT related topix.


############################################################################
# Can CINT work in multithread?

 Cint is not multithread safe. CINT must be run within one thread.

 But, as long as you have only one CINT thread, you can split other 
 precompiled jobs in to different threads. 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:41 MET