On 02/04/2014 14:12, Gisle Vanem wrote:
> "Brian Gladman" <b...@gladman.plus.com> wrote:
> 
>> For the present, I realised that I can make my life easier with a small
>> addition to gmp_h.in:
>>
>> #if defined( _MSC_VER ) && defined( MSC_BUILD_DLL )
>> # define __GMP_LIBGMP_DLL
>> # define __GMP_WITHIN_GMP
>> # define __GMP_WITHIN_GMPXX
>> #endif
> 
> All these hacks boils down to how and what should be exported/imported
> when using/building a .dll. So why not
> use a (generated) mpir.def instead? Then there should be no
> issue what is exported at the link stage.

I lean towards the __declspec() based approach for two reasons: (a) I
don't have to maintain two files, and (b) name mangling in C++ exports
is handled automatically.

There used to be other differences that I suspect influenced the
original choice.

> But I suppose using GNU tools when building for MSVC is out of the
> question. Too bad if so. 

Correct :-)

> As things are now, IMHO the building for MSVC could need a real cleanup.

Yes, I did want to cleanup this aspect of the MSVC build - it is now
straightforward: MSC_BUILD_DLL to build an MPIR DLL, MSC_USE_DLL to use
an MPIR DLL.

   best regards,

     Brian

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to