Re: Link Problems with VC++5 ?

From: Valery Fine (fine@bnl.gov)
Date: Fri Feb 19 1999 - 04:22:25 MET


-----Original Message-----
From: Ralf Reinhardt <reinh@wpos3.physik.uni-wuppertal.de>
To: Roottalk <roottalk@hpsalo.cern.ch>
Date: 18 февраля 1999 г. 11:51
Subject: Link Problems with VC++5 ?


>Hello!
>After getting a couple of very mysterious errors while compiling, I
>decided to
>install a fresh root on my system (NT4.0 SP4 VC++5.0 SP2 German,Root
>2.21/03)
>But- my old Programs won't compile! I always get an error message of the
>type :
>
>error LNK2001: unresolved external symbol "class TVirtualPad *  gPad"
>(?gPad@@3PAVTVirtualPad@@A)
>
>for every global variable which is defined within the libraries.
>Comparing the new installation with the old one showed, that somebody
>changed
>the header files to use __declspec( dllimport ) explicitly.
>I tried in on the new installation  and everything works- but it is most
>probably the cause of my bugs.        What am I doing wrong???

  Very likely you forgot to supply the preprocessor symbol:

     -DWIN32

 or something like this.
 At least so far all global variables were defined via macro
 R__EXTERN

                      Valery



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