Compilation errors with VC++ 6.0

Pere Mato Vila Pere.Mato@cern.ch
Tue Feb 4 16:03:00 GMT 2003


  I am getting compilation errors using GSL 1.3 from a C++ program uing
with VC++ 6.0. This is new with 1.3. The compilation command and the
errors are:

         cl.exe /Od /Z7 /D "_DEBUG"
/I"C:\GaudiSoft\GAUDI_v12r0\GaudiGSL\v3r0" /I"C:\GaudiSoft\GAUDI
_v12r0\GaudiKernel\v13r4" /I"S:/sw/packages/GSL/1.3/Win32/include"
/I"S:/sw/packages/CLHEP/1.8.0.0/W
in32/include" /I"S:/sw/packages/AIDA/2.2/cpp" /D "WIN32" /D "_MBCS"  /D
"_WINDOWS" /FD /c /nologo /W
3 /GX /MD /GR /Zm500  /Fo..\Win32Debug\GaudiGSL\FuncMinimum.obj
/Fd..\Win32Debug\GaudiGSL\
                          /Tp..\src\FuncMinimum.cpp
FuncMinimum.cpp

S:/sw/packages/GSL/1.3/Win32/include\gsl/gsl_precision.h(56) : error
C2201: 'gsl_prec_eps' : must ha
ve external linkage in order to be exported/imported
S:/sw/packages/GSL/1.3/Win32/include\gsl/gsl_precision.h(56) : error
C2734: 'gsl_prec_eps' : const o
bject must be initialized if not extern
S:/sw/packages/GSL/1.3/Win32/include\gsl/gsl_precision.h(56) : error
C2133: 'gsl_prec_eps' : unknown
 size
S:/sw/packages/GSL/1.3/Win32/include\gsl/gsl_precision.h(57) : error
C2201: 'gsl_prec_sqrt_eps' : mu
st have external linkage in order to be exported/imported
S:/sw/packages/GSL/1.3/Win32/include\gsl/gsl_precision.h(57) : error
C2734: 'gsl_prec_sqrt_eps' : co
nst object must be initialized if not extern
S:/sw/packages/GSL/1.3/Win32/include\gsl/gsl_precision.h(57) : error
C2133: 'gsl_prec_sqrt_eps' : un
known size
....

  I noticed that compiling C programs including gsl_precision.h is no
problem. This is why the test programs are OK. Also, I noticed, that
replacing the statements in gsl_precision.h from

GSL_VAR const double gsl_prec_eps[];

to

GSL_VAR const double *gsl_prec_eps;

the problem goes away. Any idea?


------------------------------------------------------------
Pere Mato  CERN, EP Division, CH 1211 Geneva 23, Switzerland
           e-mail: Pere.Mato@cern.ch    tel: +41 22 76 78696
           fax:  +41 22 76 79425        gsm: +41 79 20 10855

 



More information about the Gsl-discuss mailing list