[Top][All Lists]

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

Re: [Bug-gsl] Building DLLs on Windows

From: Patrick Alken
Subject: Re: [Bug-gsl] Building DLLs on Windows
Date: Wed, 19 Jun 2019 17:45:48 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1


   I forwarded your email to Brian (cc'd) who has done a lot of work on windows 
builds of GSL. His response is pasted below.

To build GSL as it is now requires that WIN32 is defined somewhere in
the GSL code.

The _WIN32 define is always defined by the MSVC compiler so it this were
used it would mean that we did not have to define WIN32 oursleves.

But there are other (i.e. non Microsoft) compilers and it is not clear
to me that they all define _WIN32 so it seems better not to rely on this
and simply use and define WIN32 in the GSL source code.

I didn't put the WIN32 define in the code so I don't know if they had
the same rationale but I don't think it is a mistake since all it means
is that we define it within the GSL build if appropriate.

I am not subscribed to the GSL lists so I can't currently post there but
you could point him at my Githib repository at:


where there is a fully working GSL DLL build (and where I am willing to
help out if necessary).

    best regards,


On 6/19/19 1:59 AM, P wrote:
> Hi there,
> I believe there is a slight typo in gsl_types.h
> Where it should be "#ifdef _WIN32"
> Source
> https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2008/b0084kay(v=vs.90)
> Without this change DLLs do not build.
> Secondly, it seems a large number of functions are missing the prefix
> "GSL_VARS" and cannot be used in DLLs built by MSVC.
> More information on this can be found here:
> https://github.com/ampl/gsl/issues/24#issuecomment-503330162
> Kind regards
> Philip Deegan
> https://github.com/Dekken

reply via email to

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