Compiling Root DLLs under VC++ 6.0

From: Jonathan M. Gilligan (jonathan.gilligan@vanderbilt.edu)
Date: Fri Oct 30 1998 - 18:51:11 MET


With some help from the ever-generous Valery Fine I have figured out an
interim workaround for compiling .DLLs to use with ROOT 2.00/13 with MSVC
6.0. Problems arise because the new compiler puts numerical constants into
named variables, which are then declared as PUBLIC symbols. When the
BINEXPLIB utility is run, it assumes that every public symbol wants to be
exported to the .dll, so it puts these local symbols into the .DEF exports
list. This causes the linker to choke.

The long-term fix is to fix up the BINEXPLIB utility to recognize symbols
referring to constant variables (these all seem to begin with a leading
underscore ('_'), which becomes a double underscore ('__') in the .OBJ
file) and not to put these into the .DEF file. The quick fix is to do this
manually. After running BINEXPLIB and before running the linker, you should
manually edit the file and delete any line in the EXPORTS section where the
symbol begins with an underscore (all the things you do want to export
begin with a letter or a question mark ('?')).

I hope this is helpful to others who experience this difficulty. Thanks
again to Valery Fine, Rene Brun, and the rest of the ROOT team for
continually taking so much time to help individual users with their ROOT
troubles. Now if only I could get this kind of response from the people to
whom I give cash money for software.

Jonathan
===========================================================================
Jonathan M. Gilligan                     <jonathan.gilligan@vanderbilt.edu>
Research Assistant Professor and Associate Director          (615) 343-2957
Center for Molecular and Atomic Studies at Surfaces           Fax: 343-1708
Dept. of Physics and Astronomy, Box 1807-B                   Sec'y 322-6438
Vanderbilt University, Nashville, TN 37235                    Lab: 343-7578



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