[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Bug-gsl] Bug report with VC7
From: |
Vincent Sacksteder |
Subject: |
RE: [Bug-gsl] Bug report with VC7 |
Date: |
Fri, 7 Mar 2003 14:25:14 +0100 |
Dear Brian Gough,
I'm not sure that I understand your response. As I understand it, _DLL
should only be defined when compiling a DLL. In fact it was defined when I
compiled gsl.dll: I did compiles where the output of the preprocessor were
saved as *.i files, and the correct things happened.
The bug I reported occurred while compiling a client exe which used the gsl
header files to link to gsl.dll. The sample code I sent you was in the main
function of an exe. That's why I ended up modifying the GSL_VAR definition
for the case when _DLL is undefined. As I understand it, _DLL should not be
defined when compiling an exe.
So, the net is: I suspect that MSVC7 is doing the right thing by not
defining _DLL when compiling an exe. And it is defining _DLL when compiling
a dll.
As an aside, I am a little bit mixed up about why there are two gsl_types.h
files: GSL\include\gsl\gsl_types.h which is used by the exe and
GSL\src\gsl\gsl_types.h which is used by the dll. At any rate, the file I
changed was GSL\include\gsl\gsl_types.h.
On another note, I figured out why I was having problems with the #includes:
I was making my search directory be whatever\gsl\inc when it needed to be
whatever\gsl.
The warnings are still there though. All but six are type conversions. Two
were reports that gsl_sf_legendre_Plm_deriv_array and
gsl_sf_legendre_sphPlm_deriv_array might not return a value under certain
code paths. Also memcpy is reported as undefined when compiling cscal.c.
And in coulomb.c G_lam_G and Gp_lam_G are used without having been
initialized.
There is also the following warning:
\Vincent\code\GSL\src\specfunc\legendre_poly.c(649) : warning C4028: formal
parameter 2 different from declaration
Should I send a bug report for these warning issues?
Regards,
Vincent Sacksteder
-----Original Message-----
From: Brian Gough [mailto:address@hidden
Sent: Thursday, March 06, 2003 11:20 PM
To: address@hidden
Cc: address@hidden
Subject: Re: [Bug-gsl] Bug report with VC7
Vincent Sacksteder writes:
> Dear GSL developers, thanks for all your work. I just installed your
> library and started using it with the Microsoft VC7 compiler.
> The bug I am reporting is that the linker is unable to find
gsl_rng_mt19937,
> or any other constant, in the gsl.lib or gsl.dll. It is, however, able
to
> find all the functions exported by gsl.dll. And I checked that it wasn't
a
> problem with my compile settings by switching to ANSI compatibility mode
and
> also requiring the compiler to treat all my code as C code.
>
Hi,
Thanks for the bug report.
In VC6 the macro _DLL is defined when compiling the application using
a multi-threaded DLL (i.e. using /MD). This picks up the correct
(dllimport) line.
It looks like VC7 doesn't define _DLL, but defines _WINDLL or _USRDLL
instead.
I will modify GSL to check #ifdef GSL_DLL instead of or in addition to
#ifdef _DLL. In the meantime the simplest workaround may be to define
_DLL manually.
If you still have problems with #include <gsl/...> vs <...> could you
send a bug report for that.
best regards,
--
Brian Gough
----------------------------------------------------------------------
Network Theory Ltd Phone: +44 117 3179309 (UK: 0117 3179309)
15 Royal Park Fax: +44 117 9048108 (UK: 0117 9048108)
Bristol BS8 3AL WWW: http://www.network-theory.co.uk/
United Kingdom Email: address@hidden
----------------------------------------------------------------------