|
From: | Michael Goffioul |
Subject: | Re: Do we need "DEFINES=-DWIN32 -DGSL_DLL" in the Makefile of the gsl package? |
Date: | Tue, 6 Sep 2016 08:14:14 -0400 |
Le 06/09/2016 à 07:30, Tatsuro MATSUOKA a écrit :
From: "address@hidden"The description for msvc on mxe-octave include wrappers by which msvc cl and link behave like gcc and ld
Le 05/09/2016 à 15:47, Michael Goffioul a écrit :
> The necessity of GSL_DLL macro is to deal with DLL-exported variables (not functions) and MSVC compiler (and other compilers that use the same dynamic linking rules).In mxe-octave, one can see the descriptions for msvc build. Now it seems not to
>
> A DLL-exported function can be found by the linker using 2 symbols: NAME and _imp_NAME. A DLL-exported variable can only be found by the linker with _imp_VAR. When using MSVC, if the variable is not decorated with __declspec(dllimport), the linker will fail. When using GCC, the linker uses some magic bootstrap to make the variable be found by the linker with VAR symbol only.
be maintained. I feel that they are preserved for someone resuming the work. At
that time. the description in the gsl package will be useful.
and additional tools to use msvc in the unixy autotools (automake, autoconf , libtool etcs).
Ok, I have kept the code for MSVC preprocessor flags (-DWIN32 -DGSL_DLL) but they are now set by configure:
http://hg.code.sf.net/p/octave/gsl/rev/ce99f5326e87
I still have one question: for what kind of architecture do we need __declspec(dllimport) ?
Currently the flags are set for i686-pc-msdosmsvc only, but what about other architectures such as amd64-mingw32msvc, i586-mingw32, i686-mingw32msvc, i686-w64-mingw32, etc ?
[Prev in Thread] | Current Thread | [Next in Thread] |