Re: Troubles compiling DLLs for Root under VC++ 6

From: Valery Fine (fine@bnl.gov)
Date: Fri Oct 30 1998 - 16:09:52 MET


Rene, 

  this sounds like the new compiler does generate some new external 
symbols, those should not be exported at all (by M$).

 As you know MS assumes the user has to define all symbols he wants 
to export with his source code. Since we have none (and didn't want 
to introduce that) for the ROOT code) the BINEXPLIB utility was 
provided. Its soul is to try to export ALL symbols the object 
file defines (In fact this contradicts MS rules. I guess they 
has introduced some external symbols which our utility picks to 
export those it should not export). Very likely the structure of the 
VC++ object module has been improved and changed. Now  one 
has to investigate this new stricture and adjust our utility .

   I'd like some one sends me ASAP the full *.def file the BINDEXPLIB 
generates from VC 6.0 compilation to adjust BINDEXPLIB.



The lines

> > Event.exp : error LNK2001: unresolved external symbol
> > _real@4@4002a0000000000000
> > 00


 sound like MS made all constants look like the external function  
names (to save some space I guess and to avoid its duplicating 
across subroutines). Very likely such pseudo-entry point can not be 
exported across DLL's. I hope MS left some "flag" within its object 
module and this way one can adjust our BINEXPLIB utility, but one 
needs some investigation though.

  May some one on list can provide further information on the 
structure of the "new" object modules or can point me some 
references unless I pick my own version of Visual C++ 6.0 (in fact
I am reluctant to pick the brand new versions of MS compilers).


                              Valery



 On 30 Oct 98 at 11:33, 
Rene Brun wrote:

> Hi Jonathan,
> We have found a spurious character in the Makefile for Windows. We
> are now in the process of releasing Root version 2.00/13. The
> version for WindowsNT/95 is already on our web site. Let me know
> 
> Rene Brun
> 
> 
> Jonathan M. Gilligan wrote:
> > 
> > There has been a little bit of traffic about troubles with ROOT and VC++
> > 6.0. I am now having trouble and would like some advice if anyone can help.
> > I have a DLL that has been working fine with ROOT when I compiled it with
> > VC++ 5, but since I upgraded to version 6, I get the following trouble
> > (under both NT 4.0 SP3 and '95):
> > 
> > BINDEXPLIB seems to create references to symbols that the linker can't
> > resolve. Here is a session running nmake on the Root/test directory to
> > build Event.dll.
> > 
> > Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
> > Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
> > outpu
> > t filename "libEvent.dll"; ignoring directive
> > Event.exp : error LNK2001: unresolved external symbol
> > _real@4@4001a0000000000000
> > 00
> > Event.exp : error LNK2001: unresolved external symbol
> > _real@4@4002a0000000000000
> > 00
> > Event.exp : error LNK2001: unresolved external symbol
> > _real@4@4002c0000000000000
> > 00
> > Event.exp : error LNK2001: unresolved external symbol
> > _real@4@400380000000000000
> > 00
> > Event.exp : error LNK2001: unresolved external symbol
> > _real@4@4004c8000000000000
> > 00
> > Event.exp : error LNK2001: unresolved external symbol
> > _real@4@4004f0000000000000


> > Event.exp : error LNK2001: unresolved external symbol
> > _real@8@3ff8a3d70a3d70a3d8
> > 00
> > Event.exp : error LNK2001: unresolved external symbol
> > _real@8@3ffbccccccccccccd0
> > 00
> > Event.exp : error LNK2001: unresolved external symbol
> > _real@8@3ffe99999999999998
> > 00
> > libEvent.dll : fatal error LNK1120: 15 unresolved externals
> > NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~2\VC98\BIN\link.exe' :
> > return cod
> > e '0x460'
> > Stop.
> > 
> > Thanks for any help anyone can shed on this problem.
> > 
> > Jonathan Gilligan
> 
=================================================================
Dr. Valeri Faine (Fine)
    -------------------          Phone: +1 516 344 7806
Brookhaven National Laboratory   FAX  : +1 516 344 4206
Bldg. 510A /STAR                 mailto:fine@bnl.gov
Upton, New York, 11973-5000      http://nicewww.cern.ch/~fine
USA
                                 
Dr. Valery Fine                  Telex : 911621 dubna su
    -----------
LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
141980 Dubna, Moscow region      Fax   : +7 09621 6 51 45
Russia                           mailto:fine@main1.jinr.dubna.su                              



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