octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do we need "DEFINES=-DWIN32 -DGSL_DLL" in the Makefile of the gsl pa


From: Julien Bect
Subject: Re: Do we need "DEFINES=-DWIN32 -DGSL_DLL" in the Makefile of the gsl package?
Date: Mon, 5 Sep 2016 17:47:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0

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).

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.

Keeping the define's is harmless with GCC (as GCC can deal with MSVC conventions).

Hi Michael,

Thank you for the explanation.

Would someone using MSVC tools be able to run the configure script (which is need to create config.h and to determine @MKOCTFILE@ and @canonical_host_type@ in Makefile.in) ?

@++
Julien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]